2005-12-20 [colin] 1.9.100cvs97
* ABOUT-NLS * Makefile.am * autogen.sh * configure.ac * config/config.rpath * config/mkinstalldirs * m4/Makefile.am * m4/glibc2.m4 * m4/gnupg.m4 * m4/gpgme.m4 * m4/intmax.m4 * m4/longdouble.m4 * m4/longlong.m4 * m4/printf-posix.m4 * m4/signed.m4 * m4/size_max.m4 * m4/ulonglong.m4 * m4/wchar_t.m4 * m4/wint_t.m4 * m4/xsize.m4 * po/Makefile.in.in * po/Makevars * po/bg.po * po/ca.po * po/cs.po * po/de.po * po/el.po * po/en_GB.po * po/es.po * po/fi.po * po/fr.po * po/hr.po * po/hu.po * po/it.po * po/ja.po * po/ko.po * po/nb.po * po/nl.po * po/pl.po * po/pt_BR.po * po/ru.po * po/sk.po * po/sr.po * po/stamp-po * po/sv.po * po/zh_CN.po * po/zh_TW.po * src/Makefile.am * src/codeconv.c * src/compose.c * src/exporthtml.c * src/exportldif.c * src/folder.c * src/main.c * src/manual.c * src/mh.c * src/mimeview.c * src/send_message.c * src/common/Makefile.am * src/common/fnmatch.c * src/common/fnmatch.h * src/common/fnmatch_loop.c * src/common/nntp.c * src/common/plugin.c * src/common/smtp.c * src/common/socket.c * src/common/string_match.c * src/common/sylpheed.c * src/common/utils.c * src/common/utils.h * src/common/w32_dirent.c * src/common/w32_reg.c * src/common/w32_signal.c * src/common/w32_stat.c * src/common/w32_stdio.c * src/common/w32_stdlib.c * src/common/w32_string.c * src/common/w32_time.c * src/common/w32_unistd.c * src/common/w32_wait.c * src/common/w32lib.h * src/etpan/Makefile.am * src/gtk/Makefile.am * src/plugins/clamav/Makefile.am * src/plugins/demo/Makefile.am * src/plugins/dillo_viewer/Makefile.am * src/plugins/pgpcore/Makefile.am * src/plugins/pgpcore/passphrase.c * src/plugins/pgpcore/plugin.def * src/plugins/pgpcore/sgpgme.c * src/plugins/pgpcore/sylpheed.def * src/plugins/pgpcore/version.rc * src/plugins/pgpinline/Makefile.am * src/plugins/pgpinline/plugin.def * src/plugins/pgpinline/sylpheed.def * src/plugins/pgpinline/version.rc * src/plugins/pgpmime/Makefile.am * src/plugins/pgpmime/mypgpcore.def * src/plugins/pgpmime/plugin.def * src/plugins/pgpmime/sylpheed.def * src/plugins/pgpmime/version.rc * src/plugins/spamassassin/Makefile.am Very little ;-) patch from Werner Koch, providing infrastructure for cross-compiling to Win32
This commit is contained in:
parent
919459f49a
commit
4f3cef0454
104 changed files with 91844 additions and 62405 deletions
107
ChangeLog
107
ChangeLog
|
@ -1,3 +1,110 @@
|
|||
2005-12-20 [colin] 1.9.100cvs97
|
||||
|
||||
* ABOUT-NLS
|
||||
* Makefile.am
|
||||
* autogen.sh
|
||||
* configure.ac
|
||||
* config/config.rpath
|
||||
* config/mkinstalldirs
|
||||
* m4/Makefile.am
|
||||
* m4/glibc2.m4
|
||||
* m4/gnupg.m4
|
||||
* m4/gpgme.m4
|
||||
* m4/intmax.m4
|
||||
* m4/longdouble.m4
|
||||
* m4/longlong.m4
|
||||
* m4/printf-posix.m4
|
||||
* m4/signed.m4
|
||||
* m4/size_max.m4
|
||||
* m4/ulonglong.m4
|
||||
* m4/wchar_t.m4
|
||||
* m4/wint_t.m4
|
||||
* m4/xsize.m4
|
||||
* po/Makefile.in.in
|
||||
* po/Makevars
|
||||
* po/bg.po
|
||||
* po/ca.po
|
||||
* po/cs.po
|
||||
* po/de.po
|
||||
* po/el.po
|
||||
* po/en_GB.po
|
||||
* po/es.po
|
||||
* po/fi.po
|
||||
* po/fr.po
|
||||
* po/hr.po
|
||||
* po/hu.po
|
||||
* po/it.po
|
||||
* po/ja.po
|
||||
* po/ko.po
|
||||
* po/nb.po
|
||||
* po/nl.po
|
||||
* po/pl.po
|
||||
* po/pt_BR.po
|
||||
* po/ru.po
|
||||
* po/sk.po
|
||||
* po/sr.po
|
||||
* po/stamp-po
|
||||
* po/sv.po
|
||||
* po/zh_CN.po
|
||||
* po/zh_TW.po
|
||||
* src/Makefile.am
|
||||
* src/codeconv.c
|
||||
* src/compose.c
|
||||
* src/exporthtml.c
|
||||
* src/exportldif.c
|
||||
* src/folder.c
|
||||
* src/main.c
|
||||
* src/manual.c
|
||||
* src/mh.c
|
||||
* src/mimeview.c
|
||||
* src/send_message.c
|
||||
* src/common/Makefile.am
|
||||
* src/common/fnmatch.c
|
||||
* src/common/fnmatch.h
|
||||
* src/common/fnmatch_loop.c
|
||||
* src/common/nntp.c
|
||||
* src/common/plugin.c
|
||||
* src/common/smtp.c
|
||||
* src/common/socket.c
|
||||
* src/common/string_match.c
|
||||
* src/common/sylpheed.c
|
||||
* src/common/utils.c
|
||||
* src/common/utils.h
|
||||
* src/common/w32_dirent.c
|
||||
* src/common/w32_reg.c
|
||||
* src/common/w32_signal.c
|
||||
* src/common/w32_stat.c
|
||||
* src/common/w32_stdio.c
|
||||
* src/common/w32_stdlib.c
|
||||
* src/common/w32_string.c
|
||||
* src/common/w32_time.c
|
||||
* src/common/w32_unistd.c
|
||||
* src/common/w32_wait.c
|
||||
* src/common/w32lib.h
|
||||
* src/etpan/Makefile.am
|
||||
* src/gtk/Makefile.am
|
||||
* src/plugins/clamav/Makefile.am
|
||||
* src/plugins/demo/Makefile.am
|
||||
* src/plugins/dillo_viewer/Makefile.am
|
||||
* src/plugins/pgpcore/Makefile.am
|
||||
* src/plugins/pgpcore/passphrase.c
|
||||
* src/plugins/pgpcore/plugin.def
|
||||
* src/plugins/pgpcore/sgpgme.c
|
||||
* src/plugins/pgpcore/sylpheed.def
|
||||
* src/plugins/pgpcore/version.rc
|
||||
* src/plugins/pgpinline/Makefile.am
|
||||
* src/plugins/pgpinline/plugin.def
|
||||
* src/plugins/pgpinline/sylpheed.def
|
||||
* src/plugins/pgpinline/version.rc
|
||||
* src/plugins/pgpmime/Makefile.am
|
||||
* src/plugins/pgpmime/mypgpcore.def
|
||||
* src/plugins/pgpmime/plugin.def
|
||||
* src/plugins/pgpmime/sylpheed.def
|
||||
* src/plugins/pgpmime/version.rc
|
||||
* src/plugins/spamassassin/Makefile.am
|
||||
Very little ;-) patch from Werner Koch, providing
|
||||
infrastructure for cross-compiling to Win32
|
||||
|
||||
2005-12-20 [paul] 1.9.100cvs96
|
||||
|
||||
* src/account.c
|
||||
|
|
11
Makefile.am
11
Makefile.am
|
@ -1,4 +1,13 @@
|
|||
SUBDIRS = m4 po src tools config doc
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AUTOMAKE_OPTIONS = dist-bzip2
|
||||
|
||||
if PLATFORM_WIN32
|
||||
tools =
|
||||
else
|
||||
tools = tools
|
||||
endif
|
||||
|
||||
SUBDIRS = m4 po src $(tools) config doc
|
||||
|
||||
EXTRA_DIST = \
|
||||
ChangeLog \
|
||||
|
|
File diff suppressed because one or more lines are too long
48
autogen.sh
48
autogen.sh
|
@ -1,5 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
# ***** W32 build script *******
|
||||
# Used to cross-compile for Windows.
|
||||
if test "$1" = "--build-w32"; then
|
||||
tmp=`dirname $0`
|
||||
tsdir=`cd "$tmp"; pwd`
|
||||
shift
|
||||
if [ ! -f $tsdir/config/config.guess ]; then
|
||||
echo "$tsdir/config/config.guess not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
build=`$tsdir/config/config.guess`
|
||||
|
||||
[ -z "$w32root" ] && w32root="$HOME/w32root"
|
||||
echo "Using $w32root as standard install directory" >&2
|
||||
|
||||
if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
|
||||
host=i586-mingw32msvc
|
||||
crossbindir=/usr/$host/bin
|
||||
else
|
||||
echo "Debian's mingw32 cross-compiler packet is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
echo "Pease run a 'make distclean' first" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
./configure --enable-maintainer-mode --prefix=${w32root} \
|
||||
--host=i586-mingw32msvc --build=${build} \
|
||||
--with-lib-prefix=${w32root} \
|
||||
--with-libiconv-prefix=${w32root} \
|
||||
--with-gpg-error-prefix=${w32root} \
|
||||
--with-gpgme-prefix=${w32root} \
|
||||
--with-config-dir="Sylpheed-claws" \
|
||||
--disable-openssl --disable-dillo-viewer-plugin \
|
||||
--disable-nls --disable-libetpan --disable-aspell \
|
||||
--disable-trayicon-plugin \
|
||||
PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
|
||||
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end W32 build script *******
|
||||
|
||||
|
||||
aclocal -I m4 \
|
||||
&& libtoolize --force --copy \
|
||||
&& autoheader \
|
||||
|
|
|
@ -2,28 +2,13 @@
|
|||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2003 Free Software Foundation, Inc.
|
||||
# Copyright 1996-2005 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# 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 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.
|
||||
# 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.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
|
@ -50,6 +35,8 @@ host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
|||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
|
@ -60,6 +47,13 @@ else
|
|||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
|
@ -71,13 +65,19 @@ else
|
|||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $CC in
|
||||
icc|ecc)
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc)
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
|
@ -96,6 +96,9 @@ else
|
|||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
@ -138,12 +141,12 @@ if test "$with_gnu_ld" = yes; then
|
|||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we can use
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
|
@ -162,9 +165,9 @@ if test "$with_gnu_ld" = yes; then
|
|||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
|
@ -173,8 +176,15 @@ if test "$with_gnu_ld" = yes; then
|
|||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
|
@ -266,7 +276,7 @@ else
|
|||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi4*)
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
|
@ -277,8 +287,17 @@ else
|
|||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
|
||||
hardcode_direct=no
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
|
@ -295,7 +314,7 @@ else
|
|||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd*)
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
|
@ -438,7 +457,7 @@ case "$host_os" in
|
|||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi4*)
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
|
@ -450,6 +469,8 @@ case "$host_os" in
|
|||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd*)
|
||||
;;
|
||||
gnu*)
|
||||
|
@ -486,11 +507,13 @@ case "$host_os" in
|
|||
;;
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx)
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
|
@ -519,7 +542,7 @@ escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
|
|
@ -1,20 +1,32 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
|
||||
scriptversion=2004-02-15.20
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
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@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
echo "$usage"
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
|
@ -23,6 +35,10 @@ while test $# -gt 0 ; do
|
|||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
|
@ -50,17 +66,37 @@ 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 -- . 2>/dev/null; then
|
||||
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 -- . 2>/dev/null; then
|
||||
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
|
||||
|
@ -84,17 +120,17 @@ do
|
|||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -107,5 +143,8 @@ 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:
|
||||
# mkinstalldirs ends here
|
||||
|
|
66
configure.ac
66
configure.ac
|
@ -11,7 +11,7 @@ MINOR_VERSION=9
|
|||
MICRO_VERSION=100
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=96
|
||||
EXTRA_VERSION=97
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
@ -82,14 +82,19 @@ AC_PROG_CPP
|
|||
dnl AC_PROG_RANLIB
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_LIB_PREFIX
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_LIBTOOL_RC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
SYLPHEED_ACLOCAL_INCLUDE(m4)
|
||||
|
||||
dnl ******************************
|
||||
dnl Checks for host
|
||||
dnl Not needed anymore because we
|
||||
dnl do AC_CANONICAL_SYSTEM above
|
||||
dnl ******************************
|
||||
AC_CANONICAL_HOST
|
||||
dnl AC_CANONICAL_HOST
|
||||
|
||||
dnl Copied from the official gtk+-2 configure.in
|
||||
AC_MSG_CHECKING([for some Win32 platform])
|
||||
|
@ -105,11 +110,6 @@ esac
|
|||
AC_MSG_RESULT([$platform_win32])
|
||||
AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
|
||||
|
||||
if test x"$platform_win32" = x"yes"; then
|
||||
WINDRES=windres
|
||||
AC_SUBST(WINDRES)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for native Win32])
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
|
@ -124,13 +124,18 @@ AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
|
|||
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
|
||||
pthread_name=
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
|
||||
;;
|
||||
*-*-mingw*)
|
||||
# Note that we need to link to pthreadGC2 in all cases. This
|
||||
# is because some locking is used even when pthread support is
|
||||
# disabled.
|
||||
pthread_name=pthreadGC2
|
||||
CFLAGS="$CFLAGS -mms-bitfields"
|
||||
LIBS="$LIBS -lws2_32"
|
||||
LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -151,9 +156,9 @@ GETTEXT_PACKAGE=sylpheed-claws
|
|||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
|
||||
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
dnl AM_GNU_GETTEXT
|
||||
dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
|
||||
AM_GNU_GETTEXT_VERSION([0.14.5])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
localedir='${prefix}/${DATADIRNAME}/locale'
|
||||
AC_ARG_WITH(localedir,
|
||||
[ --with-localedir=DIR Locale directory],
|
||||
|
@ -212,6 +217,9 @@ if test $ac_cv_dirent_d_type = yes; then
|
|||
Define if `struct dirent' has `d_type' member.)
|
||||
fi
|
||||
|
||||
# Check whether mkdir does not take the permission argument.
|
||||
GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
|
@ -417,35 +425,51 @@ if test x$ac_cv_enable_pthread = xno; then
|
|||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# For W32 we need to use a special ptrhead lib. In this case we can't
|
||||
# use AC_CHECK_LIB because it has no means of checking for a
|
||||
# library installed under a different name. Checking for the
|
||||
# header is okay.
|
||||
if test -n "${pthread_name}" ; then
|
||||
ac_cv_enable_pthread=yes
|
||||
else
|
||||
AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
|
||||
fi
|
||||
AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
|
||||
|
||||
if test x$ac_cv_enable_pthread = xyes; then
|
||||
AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
|
||||
if test -z "${pthread_name}" ; then
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
t_oldLibs="$LIBS"
|
||||
LIBS="$LIBS"
|
||||
ac_cv_var__res_options=no
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
dnl
|
||||
dnl Check whether we need to pass -lresolv
|
||||
dnl We know that we don't need it for W32.
|
||||
dnl
|
||||
if test x$os_win32 = xno; then
|
||||
t_oldLibs="$LIBS"
|
||||
LIBS="$LIBS"
|
||||
ac_cv_var__res_options=no
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>],
|
||||
[_res.options = RES_INIT;],
|
||||
ac_cv_var__res_options=yes);
|
||||
if test "$ac_cv_var__res_options" != "yes"; then
|
||||
if test "$ac_cv_var__res_options" != "yes"; then
|
||||
LIBRESOLV="-lresolv"
|
||||
fi
|
||||
LIBS="$t_oldLibs"
|
||||
fi
|
||||
LIBS="$t_oldLibs"
|
||||
|
||||
if test "x$LIBRESOLV" = "x"; then
|
||||
if test "x$LIBRESOLV" = "x"; then
|
||||
AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
|
||||
LIBS="$t_oldLibs"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LIBRESOLV)
|
||||
|
||||
|
@ -594,7 +618,7 @@ AC_ARG_ENABLE(pgpcore-plugin,
|
|||
[ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
|
||||
if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AM_PATH_GPGME(0.4.5, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
|
||||
AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
|
||||
[ac_cv_enable_pgpcore_plugin=no])
|
||||
if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
|
||||
PLUGINS="pgpcore $PLUGINS"
|
||||
|
@ -722,6 +746,8 @@ if test x"$ac_cv_enable_libetpan" = xyes; then
|
|||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL(SYLPHEED_LIBETPAN, test "x$libetpan_result" = "xyes")
|
||||
|
||||
|
||||
dnl Libgnomeprint
|
||||
AC_MSG_CHECKING([whether to use libgnomeprint])
|
||||
|
|
|
@ -3,9 +3,10 @@ MACROS = \
|
|||
check-type.m4 \
|
||||
gnupg-check-typedef.m4 \
|
||||
aspell.m4 \
|
||||
spamassassin.m4
|
||||
spamassassin.m4 \
|
||||
gnupg.m4
|
||||
|
||||
EXTRA_DIST = $(MACROS) \
|
||||
EXTRA_DIST = codeset.m4 glibc21.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 glibc2.m4 $(MACROS) \
|
||||
missing/gdk-pixbuf.m4 \
|
||||
missing/gettext.m4 \
|
||||
missing/gpgme.m4
|
||||
|
|
30
m4/glibc2.m4
Normal file
30
m4/glibc2.m4
Normal file
|
@ -0,0 +1,30 @@
|
|||
# glibc2.m4 serial 1
|
||||
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Test for the GNU C Library, version 2.0 or newer.
|
||||
# From Bruno Haible.
|
||||
|
||||
AC_DEFUN([gt_GLIBC2],
|
||||
[
|
||||
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
|
||||
ac_cv_gnu_library_2,
|
||||
[AC_EGREP_CPP([Lucky GNU user],
|
||||
[
|
||||
#include <features.h>
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#if (__GLIBC__ >= 2)
|
||||
Lucky GNU user
|
||||
#endif
|
||||
#endif
|
||||
],
|
||||
ac_cv_gnu_library_2=yes,
|
||||
ac_cv_gnu_library_2=no)
|
||||
]
|
||||
)
|
||||
AC_SUBST(GLIBC2)
|
||||
GLIBC2="$ac_cv_gnu_library_2"
|
||||
]
|
||||
)
|
37
m4/gnupg.m4
Normal file
37
m4/gnupg.m4
Normal file
|
@ -0,0 +1,37 @@
|
|||
# gnupg.m4 - autoconf macros as used by GnuPG.
|
||||
# Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
|
||||
|
||||
dnl Stolen from gcc
|
||||
dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
|
||||
dnl of the usual 2.
|
||||
AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG],
|
||||
[AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h)
|
||||
AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_DIRECT_H
|
||||
# include <direct.h>
|
||||
#endif], [mkdir ("foo", 0);],
|
||||
gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
|
||||
if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
|
||||
AC_DEFINE(MKDIR_TAKES_ONE_ARG,1,
|
||||
[Defined if mkdir() does not take permission flags])
|
||||
fi
|
||||
])
|
||||
|
238
m4/gpgme.m4
Normal file
238
m4/gpgme.m4
Normal file
|
@ -0,0 +1,238 @@
|
|||
# gpgme.m4 - autoconf macro to detect GPGME.
|
||||
# Copyright (C) 2002, 2003, 2004 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file 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.
|
||||
|
||||
|
||||
AC_DEFUN([_AM_PATH_GPGME_CONFIG],
|
||||
[ AC_ARG_WITH(gpgme-prefix,
|
||||
AC_HELP_STRING([--with-gpgme-prefix=PFX],
|
||||
[prefix where GPGME is installed (optional)]),
|
||||
gpgme_config_prefix="$withval", gpgme_config_prefix="")
|
||||
if test "x$gpgme_config_prefix" != x ; then
|
||||
GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
|
||||
fi
|
||||
AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
|
||||
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
gpgme_version=`$GPGME_CONFIG --version`
|
||||
fi
|
||||
gpgme_version_major=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
gpgme_version_minor=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
gpgme_version_micro=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
])
|
||||
|
||||
dnl AM_PATH_GPGME([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME],
|
||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
|
||||
GPGME_LIBS=`$GPGME_CONFIG --libs`
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
GPGME_CFLAGS=""
|
||||
GPGME_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_CFLAGS)
|
||||
AC_SUBST(GPGME_LIBS)
|
||||
])
|
||||
|
||||
dnl AM_PATH_GPGME_PTH([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme and define GPGME_PTH_CFLAGS and GPGME_PTH_LIBS.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME_PTH],
|
||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME Pth - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
if `$GPGME_CONFIG --thread=pth 2> /dev/null` ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
GPGME_PTH_CFLAGS=`$GPGME_CONFIG --thread=pth --cflags`
|
||||
GPGME_PTH_LIBS=`$GPGME_CONFIG --thread=pth --libs`
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
GPGME_PTH_CFLAGS=""
|
||||
GPGME_PTH_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_PTH_CFLAGS)
|
||||
AC_SUBST(GPGME_PTH_LIBS)
|
||||
])
|
||||
|
||||
dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
|
||||
dnl and GPGME_PTHREAD_LIBS.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME_PTHREAD],
|
||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
|
||||
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
GPGME_PTHREAD_CFLAGS=""
|
||||
GPGME_PTHREAD_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_PTHREAD_CFLAGS)
|
||||
AC_SUBST(GPGME_PTHREAD_LIBS)
|
||||
])
|
30
m4/intmax.m4
Normal file
30
m4/intmax.m4
Normal file
|
@ -0,0 +1,30 @@
|
|||
# intmax.m4 serial 2 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
|
||||
dnl find a replacement if it is lacking.
|
||||
|
||||
AC_DEFUN([gt_TYPE_INTMAX_T],
|
||||
[
|
||||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#if HAVE_STDINT_H_WITH_UINTMAX
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H_WITH_UINTMAX
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
|
||||
if test $gt_cv_c_intmax_t = yes; then
|
||||
AC_DEFINE(HAVE_INTMAX_T, 1,
|
||||
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
|
||||
fi
|
||||
])
|
28
m4/longdouble.m4
Normal file
28
m4/longdouble.m4
Normal file
|
@ -0,0 +1,28 @@
|
|||
# longdouble.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the compiler supports the 'long double' type.
|
||||
dnl Prerequisite: AC_PROG_CC
|
||||
|
||||
AC_DEFUN([gt_TYPE_LONGDOUBLE],
|
||||
[
|
||||
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
|
||||
[if test "$GCC" = yes; then
|
||||
gt_cv_c_long_double=yes
|
||||
else
|
||||
AC_TRY_COMPILE([
|
||||
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
|
||||
long double foo = 0.0;
|
||||
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
|
||||
int array [2*(sizeof(long double) >= sizeof(double)) - 1];
|
||||
], ,
|
||||
gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
|
||||
fi])
|
||||
if test $gt_cv_c_long_double = yes; then
|
||||
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
|
||||
fi
|
||||
])
|
23
m4/longlong.m4
Normal file
23
m4/longlong.m4
Normal file
|
@ -0,0 +1,23 @@
|
|||
# longlong.m4 serial 5
|
||||
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_LONG_LONG if 'long long' works.
|
||||
|
||||
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
|
||||
[
|
||||
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
|
||||
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
|
||||
[long long llmax = (long long) -1;
|
||||
return ll << i | ll >> i | llmax / ll | llmax % ll;],
|
||||
ac_cv_type_long_long=yes,
|
||||
ac_cv_type_long_long=no)])
|
||||
if test $ac_cv_type_long_long = yes; then
|
||||
AC_DEFINE(HAVE_LONG_LONG, 1,
|
||||
[Define if you have the 'long long' type.])
|
||||
fi
|
||||
])
|
44
m4/printf-posix.m4
Normal file
44
m4/printf-posix.m4
Normal file
|
@ -0,0 +1,44 @@
|
|||
# printf-posix.m4 serial 2 (gettext-0.13.1)
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether the printf() function supports POSIX/XSI format strings with
|
||||
dnl positions.
|
||||
|
||||
AC_DEFUN([gt_PRINTF_POSIX],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
|
||||
gt_cv_func_printf_posix,
|
||||
[
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
/* The string "%2$d %1$d", with dollar characters protected from the shell's
|
||||
dollar expansion (possibly an autoconf bug). */
|
||||
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
|
||||
static char buf[100];
|
||||
int main ()
|
||||
{
|
||||
sprintf (buf, format, 33, 55);
|
||||
return (strcmp (buf, "55 33") != 0);
|
||||
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
|
||||
[
|
||||
AC_EGREP_CPP(notposix, [
|
||||
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
|
||||
notposix
|
||||
#endif
|
||||
], gt_cv_func_printf_posix="guessing no",
|
||||
gt_cv_func_printf_posix="guessing yes")
|
||||
])
|
||||
])
|
||||
case $gt_cv_func_printf_posix in
|
||||
*yes)
|
||||
AC_DEFINE(HAVE_POSIX_PRINTF, 1,
|
||||
[Define if your printf() function supports format strings with positions.])
|
||||
;;
|
||||
esac
|
||||
])
|
17
m4/signed.m4
Normal file
17
m4/signed.m4
Normal file
|
@ -0,0 +1,17 @@
|
|||
# signed.m4 serial 1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([bh_C_SIGNED],
|
||||
[
|
||||
AC_CACHE_CHECK([for signed], bh_cv_c_signed,
|
||||
[AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
|
||||
if test $bh_cv_c_signed = no; then
|
||||
AC_DEFINE(signed, ,
|
||||
[Define to empty if the C compiler doesn't support this keyword.])
|
||||
fi
|
||||
])
|
59
m4/size_max.m4
Normal file
59
m4/size_max.m4
Normal file
|
@ -0,0 +1,59 @@
|
|||
# size_max.m4 serial 2
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([gl_SIZE_MAX],
|
||||
[
|
||||
AC_CHECK_HEADERS(stdint.h)
|
||||
dnl First test whether the system already has SIZE_MAX.
|
||||
AC_MSG_CHECKING([for SIZE_MAX])
|
||||
result=
|
||||
AC_EGREP_CPP([Found it], [
|
||||
#include <limits.h>
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#ifdef SIZE_MAX
|
||||
Found it
|
||||
#endif
|
||||
], result=yes)
|
||||
if test -z "$result"; then
|
||||
dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
|
||||
dnl than the type 'unsigned long'.
|
||||
dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
|
||||
dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
|
||||
_AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
|
||||
[#include <stddef.h>], result=?)
|
||||
_AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
|
||||
[#include <stddef.h>], result=?)
|
||||
_AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
|
||||
[#include <stddef.h>], result=?)
|
||||
if test "$fits_in_uint" = 1; then
|
||||
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
|
||||
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
|
||||
AC_TRY_COMPILE([#include <stddef.h>
|
||||
extern size_t foo;
|
||||
extern unsigned long foo;
|
||||
], [], fits_in_uint=0)
|
||||
fi
|
||||
if test -z "$result"; then
|
||||
if test "$fits_in_uint" = 1; then
|
||||
result="$res_hi$res_lo"U
|
||||
else
|
||||
result="$res_hi$res_lo"UL
|
||||
fi
|
||||
else
|
||||
dnl Shouldn't happen, but who knows...
|
||||
result='~(size_t)0'
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$result])
|
||||
if test "$result" != yes; then
|
||||
AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
|
||||
[Define as the maximum value of type 'size_t', if the system doesn't define it.])
|
||||
fi
|
||||
])
|
23
m4/ulonglong.m4
Normal file
23
m4/ulonglong.m4
Normal file
|
@ -0,0 +1,23 @@
|
|||
# ulonglong.m4 serial 4
|
||||
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
|
||||
|
||||
AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
|
||||
[
|
||||
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
|
||||
[AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
|
||||
[unsigned long long ullmax = (unsigned long long) -1;
|
||||
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
|
||||
ac_cv_type_unsigned_long_long=yes,
|
||||
ac_cv_type_unsigned_long_long=no)])
|
||||
if test $ac_cv_type_unsigned_long_long = yes; then
|
||||
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
|
||||
[Define if you have the 'unsigned long long' type.])
|
||||
fi
|
||||
])
|
20
m4/wchar_t.m4
Normal file
20
m4/wchar_t.m4
Normal file
|
@ -0,0 +1,20 @@
|
|||
# wchar_t.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether <stddef.h> has the 'wchar_t' type.
|
||||
dnl Prerequisite: AC_PROG_CC
|
||||
|
||||
AC_DEFUN([gt_TYPE_WCHAR_T],
|
||||
[
|
||||
AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
|
||||
[AC_TRY_COMPILE([#include <stddef.h>
|
||||
wchar_t foo = (wchar_t)'\0';], ,
|
||||
gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
|
||||
if test $gt_cv_c_wchar_t = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
|
||||
fi
|
||||
])
|
20
m4/wint_t.m4
Normal file
20
m4/wint_t.m4
Normal file
|
@ -0,0 +1,20 @@
|
|||
# wint_t.m4 serial 1 (gettext-0.12)
|
||||
dnl Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Test whether <wchar.h> has the 'wint_t' type.
|
||||
dnl Prerequisite: AC_PROG_CC
|
||||
|
||||
AC_DEFUN([gt_TYPE_WINT_T],
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
|
||||
[AC_TRY_COMPILE([#include <wchar.h>
|
||||
wint_t foo = (wchar_t)'\0';], ,
|
||||
gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
|
||||
if test $gt_cv_c_wint_t = yes; then
|
||||
AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
|
||||
fi
|
||||
])
|
13
m4/xsize.m4
Normal file
13
m4/xsize.m4
Normal file
|
@ -0,0 +1,13 @@
|
|||
# xsize.m4 serial 3
|
||||
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_XSIZE],
|
||||
[
|
||||
dnl Prerequisites of lib/xsize.h.
|
||||
AC_REQUIRE([gl_SIZE_MAX])
|
||||
AC_REQUIRE([AC_C_INLINE])
|
||||
AC_CHECK_HEADERS(stdint.h)
|
||||
])
|
|
@ -1,20 +1,18 @@
|
|||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
#
|
||||
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
|
||||
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
|
||||
#
|
||||
# - Modified by jacob berkman <jacob@ximian.com> to install
|
||||
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
|
||||
# Origin: gettext-0.14.4
|
||||
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
@ -26,230 +24,361 @@ VPATH = @srcdir@
|
|||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
libdir = @libdir@
|
||||
localedir = $(libdir)/locale
|
||||
gnulocaledir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
|
||||
subdir = po
|
||||
localedir = $(datadir)/locale
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
MSGMERGE = msgmerge
|
||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||
MSGINIT = msginit
|
||||
MSGCONV = msgconv
|
||||
MSGFILTER = msgfilter
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES =
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
|
||||
$(POFILES) $(GMOFILES) $(SOURCES)
|
||||
UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
|
||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -c -o $@ $<
|
||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -c --statistics -o $$file $<
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
|
||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' $< > t-$@
|
||||
mv t-$@ $@
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: $(CATALOGS)
|
||||
all-yes: stamp-po
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||
# we don't want to bother translators with empty POT files). We assume that
|
||||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
|
||||
# invocations of "make" will do nothing. This timestamp would not be necessary
|
||||
# if updating the $(CATALOGS) would always touch them; however, the rule for
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||
echo "touch stamp-po" && \
|
||||
echo timestamp > stamp-poT && \
|
||||
mv stamp-poT stamp-po; \
|
||||
}
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
else \
|
||||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||
fi; \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--msgid-bugs-address='twb@users.sourceforge.net' \
|
||||
&& test ! -f $(GETTEXT_PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
|
||||
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address"
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
|
||||
else \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
}
|
||||
|
||||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/$(DOMAIN).pot:
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
|
||||
else \
|
||||
$(MAKE) $${lang}.po-create; \
|
||||
fi
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
for file in Makevars; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs: installdirs-exec installdirs-data
|
||||
installdirs-exec:
|
||||
installdirs-data: installdirs-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
installdirs-data-no:
|
||||
installdirs-data-yes:
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
uninstall: uninstall-exec uninstall-data
|
||||
uninstall-exec:
|
||||
uninstall-data: uninstall-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
uninstall-data-no:
|
||||
uninstall-data-yes:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
done; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "glib"; then \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
fi
|
||||
|
||||
check: all
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
info dvi ps pdf html tags TAGS ctags CTAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -f remove-potcdate.sed
|
||||
rm -f stamp-poT
|
||||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
rm -f stamp-po $(GMOFILES)
|
||||
|
||||
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do \
|
||||
if test -f $(srcdir)/ChangeLog.$$i; then \
|
||||
dists="$$dists ChangeLog.$$i"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir) || exit 1; \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||
$(MAKE) update-gmo
|
||||
|
||||
# General rule for creating PO files.
|
||||
|
||||
.nop.po-create:
|
||||
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
|
||||
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
|
||||
exit 1
|
||||
|
||||
# General rule for updating PO files.
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# POTFILES is created from POTFILES.in by stripping comments, empty lines
|
||||
# and Intltool tags (enclosed in square brackets), and appending a full
|
||||
# relative path to them
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' \
|
||||
-e "s/^\[.*\] +//" \
|
||||
-e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
$(DUMMYPOFILES):
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
force:
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -18,7 +18,7 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
|||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
COPYRIGHT_HOLDER = The Sylpheed Authors
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
|
|
3991
po/en_GB.po
3991
po/en_GB.po
File diff suppressed because it is too large
Load diff
5276
po/pt_BR.po
5276
po/pt_BR.po
File diff suppressed because it is too large
Load diff
1
po/stamp-po
Normal file
1
po/stamp-po
Normal file
|
@ -0,0 +1 @@
|
|||
timestamp
|
3948
po/zh_CN.po
3948
po/zh_CN.po
File diff suppressed because it is too large
Load diff
5546
po/zh_TW.po
5546
po/zh_TW.po
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,13 @@
|
|||
SUBDIRS = common gtk plugins etpan
|
||||
|
||||
if SYLPHEED_LIBETPAN
|
||||
etpan_dir = etpan
|
||||
etpan_library = etpan/libsylpheedetpan.la
|
||||
else
|
||||
etpan_dir =
|
||||
etpan_library =
|
||||
endif
|
||||
|
||||
SUBDIRS = common gtk plugins $(etpan_dir)
|
||||
|
||||
bin_PROGRAMS = sylpheed-claws
|
||||
|
||||
|
@ -387,15 +396,21 @@ EXTRA_DIST = \
|
|||
|
||||
|
||||
INCLUDES = \
|
||||
-Icommon \
|
||||
-Igtk \
|
||||
-Ietpan
|
||||
-I$(srcdir)/common \
|
||||
-I$(srcdir)/gtk \
|
||||
-I$(srcdir)/etpan
|
||||
|
||||
if PLATFORM_WIN32
|
||||
arch_ldflags := -export-all-symbols
|
||||
else
|
||||
arch_ldflags :=
|
||||
endif
|
||||
|
||||
sylpheed_claws_LDFLAGS = \
|
||||
-export-dynamic
|
||||
$(arch_ldflags) -export-dynamic
|
||||
|
||||
sylpheed_claws_LDADD = \
|
||||
etpan/libsylpheedetpan.la \
|
||||
$(etpan_library) \
|
||||
gtk/libsylpheedgtk.la \
|
||||
$(ASPELL_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
|
@ -431,5 +446,4 @@ AM_CPPFLAGS = \
|
|||
#no-deprecated-declarations because of gpgme_data_rewind, which we have
|
||||
#to call inside gpgme due to our lack of LARGEFILE support
|
||||
|
||||
|
||||
AM_YFLAGS = -d
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#include <iconv.h>
|
||||
|
||||
#include "codeconv.h"
|
||||
#include "unmime.h"
|
||||
#include "base64.h"
|
||||
|
@ -43,6 +41,12 @@
|
|||
#include "utils.h"
|
||||
#include "prefs_common.h"
|
||||
|
||||
/* For unknown reasons the inconv.m4 macro undefs that macro if no
|
||||
const is needed. This would break the code below so we define it. */
|
||||
#ifndef ICONV_CONST
|
||||
#define ICONV_CONST
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
JIS_ASCII,
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
PLUGINDIR = $(pkglibdir)/plugins/
|
||||
noinst_LTLIBRARIES = libsylpheedcommon.la
|
||||
|
||||
libsylpheedcommon_la_SOURCES = \
|
||||
if PLATFORM_WIN32
|
||||
arch_sources = fnmatch.c \
|
||||
w32_dirent.c w32_reg.c w32_signal.c w32_stat.c \
|
||||
w32_stdio.c w32_stdlib.c w32_string.c w32_time.c \
|
||||
w32_unistd.c w32_wait.c
|
||||
arch_headers = fnmatch.h w32lib.h
|
||||
else
|
||||
arch_files =
|
||||
arch_header =
|
||||
endif
|
||||
|
||||
libsylpheedcommon_la_SOURCES = $(arch_sources) \
|
||||
base64.c \
|
||||
hooks.c \
|
||||
log.c \
|
||||
|
@ -28,7 +39,7 @@ libsylpheedcommon_la_SOURCES = \
|
|||
xmlprops.c
|
||||
|
||||
sylpheedcommonincludedir = $(pkgincludedir)/common
|
||||
sylpheedcommoninclude_HEADERS = \
|
||||
sylpheedcommoninclude_HEADERS = $(arch_headers) \
|
||||
base64.h \
|
||||
defs.h \
|
||||
hooks.h \
|
||||
|
@ -73,4 +84,5 @@ libsylpheedcommon_la_LIBADD = \
|
|||
$(PTHREAD_LIBS)
|
||||
|
||||
EXTRA_DIST = \
|
||||
version.h.in
|
||||
version.h.in fnmatch_loop.c
|
||||
|
||||
|
|
386
src/common/fnmatch.c
Normal file
386
src/common/fnmatch.c
Normal file
|
@ -0,0 +1,386 @@
|
|||
/* Copyright (C) 1991-1993,1996-1999,2000,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Enable GNU extensions in fnmatch.h. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#ifdef WIN32
|
||||
#include "fnmatch.h"
|
||||
#else
|
||||
#include <fnmatch.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
#if HAVE_STRING_H || defined _LIBC
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined STDC_HEADERS || defined _LIBC
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/* For platform which support the ISO C amendement 1 functionality we
|
||||
support user defined character classes. */
|
||||
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||
# include <wchar.h>
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && defined(HAVE_WCHAR_H)
|
||||
#undef HAVE_WCHAR_H
|
||||
#endif
|
||||
|
||||
/* We need some of the locale data (the collation sequence information)
|
||||
but there is no interface to get this information in general. Therefore
|
||||
we support a correct implementation only in glibc. */
|
||||
#ifdef _LIBC
|
||||
# include "../locale/localeinfo.h"
|
||||
# include "../locale/elem-hash.h"
|
||||
# include "../locale/coll-lookup.h"
|
||||
# include <shlib-compat.h>
|
||||
|
||||
# define CONCAT(a,b) __CONCAT(a,b)
|
||||
# define mbsinit __mbsinit
|
||||
# define mbsrtowcs __mbsrtowcs
|
||||
# define fnmatch __fnmatch
|
||||
extern int fnmatch (const char *pattern, const char *string, int flags);
|
||||
#endif
|
||||
|
||||
/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */
|
||||
#define NO_LEADING_PERIOD(flags) \
|
||||
((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#if defined _LIBC || !defined __GNU_LIBRARY__
|
||||
|
||||
|
||||
# if defined STDC_HEADERS || !defined isascii
|
||||
# define ISASCII(c) 1
|
||||
# else
|
||||
# define ISASCII(c) isascii(c)
|
||||
# endif
|
||||
|
||||
# ifdef isblank
|
||||
# define ISBLANK(c) (ISASCII (c) && isblank (c))
|
||||
# else
|
||||
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||
# endif
|
||||
# ifdef isgraph
|
||||
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
|
||||
# else
|
||||
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||
# endif
|
||||
|
||||
# define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||
# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||
# define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||
# define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||
# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||
# define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||
# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||
# define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||
# define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||
# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||
|
||||
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||
|
||||
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||
/* The GNU C library provides support for user-defined character classes
|
||||
and the functions from ISO C amendement 1. */
|
||||
# ifdef CHARCLASS_NAME_MAX
|
||||
# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
|
||||
# else
|
||||
/* This shouldn't happen but some implementation might still have this
|
||||
problem. Use a reasonable default value. */
|
||||
# define CHAR_CLASS_MAX_LENGTH 256
|
||||
# endif
|
||||
|
||||
# ifdef _LIBC
|
||||
# define IS_CHAR_CLASS(string) __wctype (string)
|
||||
# else
|
||||
# define IS_CHAR_CLASS(string) wctype (string)
|
||||
# endif
|
||||
|
||||
# ifdef _LIBC
|
||||
# define ISWCTYPE(WC, WT) __iswctype (WC, WT)
|
||||
# else
|
||||
# define ISWCTYPE(WC, WT) iswctype (WC, WT)
|
||||
# endif
|
||||
|
||||
# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
|
||||
/* In this case we are implementing the multibyte character handling. */
|
||||
# define HANDLE_MULTIBYTE 1
|
||||
# endif
|
||||
|
||||
# else
|
||||
# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
|
||||
|
||||
# define IS_CHAR_CLASS(string) \
|
||||
(STREQ (string, "alpha") || STREQ (string, "upper") \
|
||||
|| STREQ (string, "lower") || STREQ (string, "digit") \
|
||||
|| STREQ (string, "alnum") || STREQ (string, "xdigit") \
|
||||
|| STREQ (string, "space") || STREQ (string, "print") \
|
||||
|| STREQ (string, "punct") || STREQ (string, "graph") \
|
||||
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
|
||||
# endif
|
||||
|
||||
/* Avoid depending on library functions or files
|
||||
whose names are inconsistent. */
|
||||
|
||||
# if !defined _LIBC && !defined getenv
|
||||
extern char *getenv ();
|
||||
# endif
|
||||
|
||||
# ifndef errno
|
||||
extern int errno;
|
||||
# endif
|
||||
|
||||
/* Global variable. */
|
||||
static int posixly_correct;
|
||||
|
||||
/* This function doesn't exist on most systems. */
|
||||
|
||||
# if !defined HAVE___STRCHRNUL && !defined _LIBC
|
||||
static char *
|
||||
__strchrnul (s, c)
|
||||
const char *s;
|
||||
int c;
|
||||
{
|
||||
char *result = strchr (s, c);
|
||||
if (result == NULL)
|
||||
result = strchr (s, '\0');
|
||||
return result;
|
||||
}
|
||||
# endif
|
||||
|
||||
# if HANDLE_MULTIBYTE && !defined HAVE___STRCHRNUL && !defined _LIBC
|
||||
static wchar_t *
|
||||
__wcschrnul (s, c)
|
||||
const wchar_t *s;
|
||||
wint_t c;
|
||||
{
|
||||
wchar_t *result = wcschr (s, c);
|
||||
if (result == NULL)
|
||||
result = wcschr (s, '\0');
|
||||
return result;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifndef internal_function
|
||||
/* Inside GNU libc we mark some function in a special way. In other
|
||||
environments simply ignore the marking. */
|
||||
# define internal_function
|
||||
# endif
|
||||
|
||||
/* Note that this evaluates C many times. */
|
||||
# ifdef _LIBC
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
||||
# else
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
||||
# endif
|
||||
# define CHAR char
|
||||
# define UCHAR unsigned char
|
||||
# define INT int
|
||||
# define FCT internal_fnmatch
|
||||
# define EXT ext_match
|
||||
# define END end_pattern
|
||||
# define L(CS) CS
|
||||
# ifdef _LIBC
|
||||
# define BTOWC(C) __btowc (C)
|
||||
# else
|
||||
# define BTOWC(C) btowc (C)
|
||||
# endif
|
||||
# define STRLEN(S) strlen (S)
|
||||
# define STRCAT(D, S) strcat (D, S)
|
||||
#ifdef WIN32
|
||||
# define MEMPCPY(D, S, N) memcpy (D, S, N)
|
||||
#else
|
||||
# define MEMPCPY(D, S, N) __mempcpy (D, S, N)
|
||||
#endif
|
||||
# define MEMCHR(S, C, N) memchr (S, C, N)
|
||||
# define STRCOLL(S1, S2) strcoll (S1, S2)
|
||||
# include "fnmatch_loop.c"
|
||||
|
||||
|
||||
# if HANDLE_MULTIBYTE
|
||||
/* Note that this evaluates C many times. */
|
||||
# ifdef _LIBC
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
|
||||
# else
|
||||
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? towlower (c) : (c))
|
||||
# endif
|
||||
# define CHAR wchar_t
|
||||
# define UCHAR wint_t
|
||||
# define INT wint_t
|
||||
# define FCT internal_fnwmatch
|
||||
# define EXT ext_wmatch
|
||||
# define END end_wpattern
|
||||
# define L(CS) L##CS
|
||||
# define BTOWC(C) (C)
|
||||
# define STRLEN(S) __wcslen (S)
|
||||
# define STRCAT(D, S) __wcscat (D, S)
|
||||
# define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
|
||||
# define MEMCHR(S, C, N) wmemchr (S, C, N)
|
||||
# define STRCOLL(S1, S2) wcscoll (S1, S2)
|
||||
# define WIDE_CHAR_VERSION 1
|
||||
|
||||
# undef IS_CHAR_CLASS
|
||||
/* We have to convert the wide character string in a multibyte string. But
|
||||
we know that the character class names consist of alphanumeric characters
|
||||
from the portable character set, and since the wide character encoding
|
||||
for a member of the portable character set is the same code point as
|
||||
its single-byte encoding, we can use a simplified method to convert the
|
||||
string to a multibyte character string. */
|
||||
static wctype_t
|
||||
is_char_class (const wchar_t *wcs)
|
||||
{
|
||||
char s[CHAR_CLASS_MAX_LENGTH + 1];
|
||||
char *cp = s;
|
||||
|
||||
do
|
||||
{
|
||||
/* Test for a printable character from the portable character set. */
|
||||
# ifdef _LIBC
|
||||
if (*wcs < 0x20 || *wcs > 0x7e
|
||||
|| *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60)
|
||||
return (wctype_t) 0;
|
||||
# else
|
||||
switch (*wcs)
|
||||
{
|
||||
case L' ': case L'!': case L'"': case L'#': case L'%':
|
||||
case L'&': case L'\'': case L'(': case L')': case L'*':
|
||||
case L'+': case L',': case L'-': case L'.': case L'/':
|
||||
case L'0': case L'1': case L'2': case L'3': case L'4':
|
||||
case L'5': case L'6': case L'7': case L'8': case L'9':
|
||||
case L':': case L';': case L'<': case L'=': case L'>':
|
||||
case L'?':
|
||||
case L'A': case L'B': case L'C': case L'D': case L'E':
|
||||
case L'F': case L'G': case L'H': case L'I': case L'J':
|
||||
case L'K': case L'L': case L'M': case L'N': case L'O':
|
||||
case L'P': case L'Q': case L'R': case L'S': case L'T':
|
||||
case L'U': case L'V': case L'W': case L'X': case L'Y':
|
||||
case L'Z':
|
||||
case L'[': case L'\\': case L']': case L'^': case L'_':
|
||||
case L'a': case L'b': case L'c': case L'd': case L'e':
|
||||
case L'f': case L'g': case L'h': case L'i': case L'j':
|
||||
case L'k': case L'l': case L'm': case L'n': case L'o':
|
||||
case L'p': case L'q': case L'r': case L's': case L't':
|
||||
case L'u': case L'v': case L'w': case L'x': case L'y':
|
||||
case L'z': case L'{': case L'|': case L'}': case L'~':
|
||||
break;
|
||||
default:
|
||||
return (wctype_t) 0;
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Avoid overrunning the buffer. */
|
||||
if (cp == s + CHAR_CLASS_MAX_LENGTH)
|
||||
return (wctype_t) 0;
|
||||
|
||||
*cp++ = (char) *wcs++;
|
||||
}
|
||||
while (*wcs != L'\0');
|
||||
|
||||
*cp = '\0';
|
||||
|
||||
# ifdef _LIBC
|
||||
return __wctype (s);
|
||||
# else
|
||||
return wctype (s);
|
||||
# endif
|
||||
}
|
||||
# define IS_CHAR_CLASS(string) is_char_class (string)
|
||||
|
||||
# include "fnmatch_loop.c"
|
||||
# endif
|
||||
|
||||
|
||||
int
|
||||
fnmatch (pattern, string, flags)
|
||||
const char *pattern;
|
||||
const char *string;
|
||||
int flags;
|
||||
{
|
||||
# if HANDLE_MULTIBYTE
|
||||
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
|
||||
{
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
wchar_t *wpattern;
|
||||
wchar_t *wstring;
|
||||
|
||||
/* Convert the strings into wide characters. */
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
n = mbsrtowcs (NULL, &pattern, 0, &ps);
|
||||
if (__builtin_expect (n, 0) == (size_t) -1)
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
assert (mbsinit (&ps));
|
||||
(void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
|
||||
|
||||
assert (mbsinit (&ps));
|
||||
n = mbsrtowcs (NULL, &string, 0, &ps);
|
||||
if (__builtin_expect (n, 0) == (size_t) -1)
|
||||
/* Something wrong.
|
||||
XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
already done? */
|
||||
return -1;
|
||||
wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
|
||||
assert (mbsinit (&ps));
|
||||
(void) mbsrtowcs (wstring, &string, n + 1, &ps);
|
||||
|
||||
return internal_fnwmatch (wpattern, wstring, wstring + n,
|
||||
flags & FNM_PERIOD, flags);
|
||||
}
|
||||
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
|
||||
|
||||
return internal_fnmatch (pattern, string, string + strlen (string),
|
||||
flags & FNM_PERIOD, flags);
|
||||
}
|
||||
|
||||
# ifdef _LIBC
|
||||
# undef fnmatch
|
||||
versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
|
||||
# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
|
||||
strong_alias (__fnmatch, __fnmatch_old)
|
||||
compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
84
src/common/fnmatch.h
Normal file
84
src/common/fnmatch.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
/* Copyright (C) 1991,92,93,96,97,98,99,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
#define _FNMATCH_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# undef __P
|
||||
# define __P(protos) protos
|
||||
# endif
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# undef __P
|
||||
# define __P(protos) ()
|
||||
/* We can get away without defining `const' here only because in this file
|
||||
it is used only inside the prototype for `fnmatch', which is elided in
|
||||
non-ANSI C where `const' is problematical. */
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
#ifndef const
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# define __const const
|
||||
# else
|
||||
# define __const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* We #undef these before defining them because some losing systems
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
#undef FNM_PATHNAME
|
||||
#undef FNM_NOESCAPE
|
||||
#undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
|
||||
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
|
||||
#endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
#define FNM_NOMATCH 1
|
||||
|
||||
/* This value is returned if the implementation does not support
|
||||
`fnmatch'. Since this is not the case here it will never be
|
||||
returned but the conformance test suites still require the symbol
|
||||
to be defined. */
|
||||
#ifdef _XOPEN_SOURCE
|
||||
# define FNM_NOSYS (-1)
|
||||
#endif
|
||||
|
||||
/* Match NAME against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((__const char *__pattern, __const char *__name,
|
||||
int __flags));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* fnmatch.h */
|
1237
src/common/fnmatch_loop.c
Normal file
1237
src/common/fnmatch_loop.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -22,7 +22,12 @@
|
|||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -21,7 +21,12 @@
|
|||
|
||||
#include "defs.h"
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
@ -121,11 +126,28 @@ static Plugin *plugin_get_by_filename(const gchar *filename)
|
|||
*/
|
||||
static gint plugin_load_deps(const gchar *filename, gchar **error)
|
||||
{
|
||||
gchar *tmp = g_strdup(filename);
|
||||
gchar *tmp;
|
||||
gchar *deps_file = NULL;
|
||||
FILE *fp = NULL;
|
||||
gchar buf[BUFFSIZE];
|
||||
#ifdef G_OS_WIN32
|
||||
char *fnamebuf;
|
||||
const char *s;
|
||||
|
||||
s = strchr (filename, '/');
|
||||
if (s)
|
||||
s++;
|
||||
else
|
||||
s = filename;
|
||||
fnamebuf = g_strconcat(sylpheed_get_startup_dir(),
|
||||
"\\lib\\sylpheed-claws\\plugins\\",
|
||||
s,
|
||||
NULL);
|
||||
filename = fnamebuf;
|
||||
|
||||
#endif
|
||||
|
||||
tmp = g_strdup(filename);
|
||||
*strrchr(tmp, '.') = '\0';
|
||||
deps_file = g_strconcat(tmp, ".deps", NULL);
|
||||
g_free(tmp);
|
||||
|
@ -162,6 +184,9 @@ static gint plugin_load_deps(const gchar *filename, gchar **error)
|
|||
}
|
||||
}
|
||||
fclose(fp);
|
||||
#ifdef G_OS_WIN32
|
||||
g_free (fnamebuf);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -215,6 +240,7 @@ Plugin *plugin_load(const gchar *filename, gchar **error)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
debug_print("trying to load `%s'\n", filename);
|
||||
plugin->module = g_module_open(filename, 0);
|
||||
if (plugin->module == NULL) {
|
||||
*error = g_strdup(g_module_error());
|
||||
|
|
|
@ -22,7 +22,12 @@
|
|||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -196,6 +196,7 @@ gint sock_set_io_timeout(guint sec)
|
|||
|
||||
void refresh_resolvers(void)
|
||||
{
|
||||
#ifdef G_OS_UNIX
|
||||
static time_t resolv_conf_changed = (time_t)NULL;
|
||||
struct stat s;
|
||||
|
||||
|
@ -211,6 +212,7 @@ void refresh_resolvers(void)
|
|||
}
|
||||
} /* else
|
||||
we'll have bigger problems. */
|
||||
#endif /*G_OS_UNIX*/
|
||||
}
|
||||
|
||||
gint fd_connect_unix(const gchar *path)
|
||||
|
@ -643,6 +645,7 @@ static gint sock_connect_by_getaddrinfo(const gchar *hostname, gushort port)
|
|||
/* TODO: Recreate this for sock_connect_thread() */
|
||||
SockInfo *sock_connect_cmd(const gchar *hostname, const gchar *tunnelcmd)
|
||||
{
|
||||
#ifdef G_OS_UNIX
|
||||
gint fd[2];
|
||||
int r;
|
||||
|
||||
|
@ -662,6 +665,10 @@ SockInfo *sock_connect_cmd(const gchar *hostname, const gchar *tunnelcmd)
|
|||
|
||||
close(fd[1]);
|
||||
return sockinfo_from_fd(hostname, 0, fd[0]);
|
||||
#else
|
||||
/* We would need a special implementaion for W32. */
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -679,7 +686,7 @@ SockInfo *sock_connect(const gchar *hostname, gushort port)
|
|||
#else
|
||||
#ifdef G_OS_WIN32
|
||||
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
|
||||
g_warning("socket() failed: %ld\n", WSAGetLastError());
|
||||
g_warning("socket() failed: %d\n", WSAGetLastError());
|
||||
#else
|
||||
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||
perror("socket");
|
||||
|
@ -1244,7 +1251,9 @@ gint fd_write_all(gint fd, const gchar *buf, gint len)
|
|||
while (len) {
|
||||
if (fd_check_io(fd, G_IO_OUT) < 0)
|
||||
return -1;
|
||||
#ifndef G_OS_WIN32
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
n = write(fd, buf, len);
|
||||
if (n <= 0) {
|
||||
log_error("write on fd%d: %s\n", fd, strerror(errno));
|
||||
|
|
|
@ -23,7 +23,12 @@
|
|||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "string_match.h"
|
||||
|
|
|
@ -24,7 +24,12 @@
|
|||
#include "defs.h"
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
|
@ -94,9 +99,11 @@ gboolean sylpheed_init(int *argc, char ***argv)
|
|||
debug_print("Starting sylpheed version %08x\n", VERSION_NUMERIC);
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
#ifdef ENABLE_NLS
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
bind_textdomain_codeset (PACKAGE, "UTF-8");
|
||||
textdomain(PACKAGE);
|
||||
#endif /*ENABLE_NLS*/
|
||||
putenv("G_BROKEN_FILENAMES=1");
|
||||
|
||||
/* backup if old rc file exists */
|
||||
|
|
|
@ -24,7 +24,12 @@
|
|||
#include "defs.h"
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef ENABLE_NLS
|
||||
#include <glib/gi18n.h>
|
||||
#else
|
||||
#define _(a) (a)
|
||||
#define N_(a) (a)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -45,11 +50,15 @@
|
|||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <regex.h>
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
# include <direct.h>
|
||||
# include <io.h>
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
|
@ -59,6 +68,9 @@
|
|||
#define BUFFSIZE 8192
|
||||
|
||||
static gboolean debug_mode = FALSE;
|
||||
#ifdef G_OS_WIN32
|
||||
static GSList *tempfiles=NULL;
|
||||
#endif
|
||||
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 7, 0) && !defined(G_OS_UNIX)
|
||||
|
@ -153,6 +165,38 @@ gint g_chmod(const gchar *path, gint mode)
|
|||
}
|
||||
#endif /* GLIB_CHECK_VERSION && G_OS_UNIX */
|
||||
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gint mkstemp_name(const gchar *template, gchar **name_used)
|
||||
{
|
||||
static gulong count=0; /* W32-_mktemp only supports up to 27
|
||||
tempfiles... */
|
||||
int tmpfd;
|
||||
|
||||
*name_used = g_strdup_printf("%s.%ld",_mktemp(template),count++);
|
||||
tmpfd = open (*name_used, (O_CREAT | O_RDWR | O_BINARY
|
||||
| S_IREAD | S_IWRITE));
|
||||
|
||||
tempfiles=g_slist_append(tempfiles, g_strdup(*name_used));
|
||||
if (tmpfd<0) {
|
||||
perror(g_strdup_printf("cant create %s",*name_used));
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
return tmpfd;
|
||||
}
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gint mkstemp(const gchar *template)
|
||||
{
|
||||
gchar *dummyname;
|
||||
gint res = mkstemp_name(template, &dummyname);
|
||||
g_free(dummyname);
|
||||
return res;
|
||||
}
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
void list_free_strings(GList *list)
|
||||
{
|
||||
list = g_list_first(list);
|
||||
|
@ -326,17 +370,35 @@ gchar *strstr2(const gchar *s1, const gchar *s2)
|
|||
gint path_cmp(const gchar *s1, const gchar *s2)
|
||||
{
|
||||
gint len1, len2;
|
||||
int rc;
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *s1buf, *s2buf;
|
||||
#endif
|
||||
|
||||
if (s1 == NULL || s2 == NULL) return -1;
|
||||
if (*s1 == '\0' || *s2 == '\0') return -1;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
s1buf = g_strdup (s1);
|
||||
s2buf = g_strdup (s2);
|
||||
subst_char (s1buf, '/', G_DIR_SEPARATOR);
|
||||
subst_char (s2buf, '/', G_DIR_SEPARATOR);
|
||||
s1 = s1buf;
|
||||
s2 = s2buf;
|
||||
#endif /* !G_OS_WIN32 */
|
||||
|
||||
len1 = strlen(s1);
|
||||
len2 = strlen(s2);
|
||||
|
||||
if (s1[len1 - 1] == G_DIR_SEPARATOR) len1--;
|
||||
if (s2[len2 - 1] == G_DIR_SEPARATOR) len2--;
|
||||
|
||||
return strncmp(s1, s2, MAX(len1, len2));
|
||||
rc = strncmp(s1, s2, MAX(len1, len2));
|
||||
#ifdef G_OS_WIN32
|
||||
g_free (s1buf);
|
||||
g_free (s2buf);
|
||||
#endif /* !G_OS_WIN32 */
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* remove trailing return code */
|
||||
|
@ -1218,7 +1280,11 @@ void subst_for_filename(gchar *str)
|
|||
{
|
||||
if (!str)
|
||||
return;
|
||||
#ifdef G_OS_WIN32
|
||||
subst_chars(str, "\t\r\n\\/*:", '_');
|
||||
#else
|
||||
subst_chars(str, "\t\r\n\\/*", '_');
|
||||
#endif
|
||||
}
|
||||
|
||||
void subst_for_shellsafe_filename(gchar *str)
|
||||
|
@ -1811,17 +1877,122 @@ gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#ifndef CSIDL_APPDATA
|
||||
#define CSIDL_APPDATA 0x001a
|
||||
#endif
|
||||
#ifndef CSIDL_LOCAL_APPDATA
|
||||
#define CSIDL_LOCAL_APPDATA 0x001c
|
||||
#endif
|
||||
#ifndef CSIDL_FLAG_CREATE
|
||||
#define CSIDL_FLAG_CREATE 0x8000
|
||||
#endif
|
||||
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
||||
|
||||
#define RTLD_LAZY 0
|
||||
const char *
|
||||
w32_strerror (int w32_errno)
|
||||
{
|
||||
static char strerr[256];
|
||||
int ec = (int)GetLastError ();
|
||||
|
||||
if (w32_errno == 0)
|
||||
w32_errno = ec;
|
||||
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, w32_errno,
|
||||
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
strerr, DIM (strerr)-1, NULL);
|
||||
return strerr;
|
||||
}
|
||||
|
||||
static __inline__ void *
|
||||
dlopen (const char * name, int flag)
|
||||
{
|
||||
void * hd = LoadLibrary (name);
|
||||
return hd;
|
||||
}
|
||||
|
||||
static __inline__ void *
|
||||
dlsym (void * hd, const char * sym)
|
||||
{
|
||||
if (hd && sym)
|
||||
{
|
||||
void * fnc = GetProcAddress (hd, sym);
|
||||
if (!fnc)
|
||||
return NULL;
|
||||
return fnc;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static __inline__ const char *
|
||||
dlerror (void)
|
||||
{
|
||||
return w32_strerror (0);
|
||||
}
|
||||
|
||||
|
||||
static __inline__ int
|
||||
dlclose (void * hd)
|
||||
{
|
||||
if (hd)
|
||||
{
|
||||
FreeLibrary (hd);
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static HRESULT
|
||||
w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e)
|
||||
{
|
||||
static int initialized;
|
||||
static HRESULT (WINAPI * func)(HWND,int,HANDLE,DWORD,LPSTR);
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
static char *dllnames[] = { "shell32.dll", "shfolder.dll", NULL };
|
||||
void *handle;
|
||||
int i;
|
||||
|
||||
initialized = 1;
|
||||
|
||||
for (i=0, handle = NULL; !handle && dllnames[i]; i++)
|
||||
{
|
||||
handle = dlopen (dllnames[i], RTLD_LAZY);
|
||||
if (handle)
|
||||
{
|
||||
func = dlsym (handle, "SHGetFolderPathA");
|
||||
if (!func)
|
||||
{
|
||||
dlclose (handle);
|
||||
handle = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (func)
|
||||
return func (a,b,c,d,e);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
const gchar *get_home_dir(void)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
static const gchar *home_dir = NULL;
|
||||
static char home_dir[MAX_PATH] = "";
|
||||
|
||||
if (!home_dir) {
|
||||
home_dir = g_get_home_dir();
|
||||
if (!home_dir)
|
||||
home_dir = "C:\\Sylpheed";
|
||||
if (home_dir[0] == '\0')
|
||||
{
|
||||
if (w32_shgetfolderpath
|
||||
(NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
|
||||
NULL, 0, home_dir) < 0)
|
||||
strcpy (home_dir, "C:\\Sylpheed");
|
||||
}
|
||||
|
||||
return home_dir;
|
||||
#else
|
||||
return g_get_home_dir();
|
||||
|
@ -1833,14 +2004,8 @@ const gchar *get_rc_dir(void)
|
|||
static gchar *rc_dir = NULL;
|
||||
|
||||
if (!rc_dir)
|
||||
#ifdef G_OS_WIN32
|
||||
rc_dir = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
|
||||
"Application Data", G_DIR_SEPARATOR_S,
|
||||
RC_DIR, NULL);
|
||||
#else
|
||||
rc_dir = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
|
||||
RC_DIR, NULL);
|
||||
#endif
|
||||
|
||||
return rc_dir;
|
||||
}
|
||||
|
@ -3073,7 +3238,7 @@ gint change_file_mode_rw(FILE *fp, const gchar *file)
|
|||
|
||||
FILE *my_tmpfile(void)
|
||||
{
|
||||
#if HAVE_MKSTEMP
|
||||
#if HAVE_MKSTEMP || defined(G_OS_WIN32)
|
||||
const gchar suffix[] = ".XXXXXX";
|
||||
const gchar *tmpdir;
|
||||
guint tmplen;
|
||||
|
@ -3101,14 +3266,16 @@ FILE *my_tmpfile(void)
|
|||
if (fd < 0)
|
||||
return tmpfile();
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
g_unlink(fname);
|
||||
#endif
|
||||
|
||||
fp = fdopen(fd, "w+b");
|
||||
if (!fp)
|
||||
close(fd);
|
||||
else
|
||||
return fp;
|
||||
#endif /* HAVE_MKSTEMP */
|
||||
#endif /* HAVE_MKSTEMP || G_OS_WIN32 */
|
||||
|
||||
return tmpfile();
|
||||
}
|
||||
|
@ -3116,10 +3283,15 @@ FILE *my_tmpfile(void)
|
|||
FILE *get_tmpfile_in_dir(const gchar *dir, gchar **filename)
|
||||
{
|
||||
int fd;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
char *template = g_strdup_printf ("%s%csylpheed.XXXXXX",
|
||||
dir, G_DIR_SEPARATOR);
|
||||
fd = mkstemp_name(template, filename);
|
||||
g_free(template);
|
||||
#else
|
||||
*filename = g_strdup_printf("%s%csylpheed.XXXXXX", dir, G_DIR_SEPARATOR);
|
||||
fd = mkstemp(*filename);
|
||||
|
||||
#endif
|
||||
return fdopen(fd, "w+");
|
||||
}
|
||||
|
||||
|
@ -3558,6 +3730,14 @@ void debug_print_real(const gchar *format, ...)
|
|||
g_print("%s", buf);
|
||||
}
|
||||
|
||||
|
||||
const char * debug_srcname(const char *file)
|
||||
{
|
||||
const char *s = strrchr (file, '/');
|
||||
return s? s+1:file;
|
||||
}
|
||||
|
||||
|
||||
void * subject_table_lookup(GHashTable *subject_table, gchar * subject)
|
||||
{
|
||||
if (subject == NULL)
|
||||
|
|
|
@ -189,7 +189,7 @@ typedef gpointer (*GNodeMapFunc) (gpointer nodedata, gpointer data);
|
|||
void debug_set_mode (gboolean mode);
|
||||
gboolean debug_get_mode (void);
|
||||
#define debug_print \
|
||||
debug_print_real(__FILE__ ":%d:", __LINE__), \
|
||||
debug_print_real("%s:%d:", debug_srcname(__FILE__), __LINE__), \
|
||||
debug_print_real
|
||||
|
||||
/* for macro expansion */
|
||||
|
@ -500,6 +500,7 @@ size_t my_strftime (gchar *s,
|
|||
|
||||
/* debugging */
|
||||
void debug_print_real (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
|
||||
const char * debug_srcname (const char *file);
|
||||
|
||||
/* subject threading */
|
||||
void * subject_table_lookup(GHashTable *subject_table, gchar * subject);
|
||||
|
|
102
src/common/w32_dirent.c
Normal file
102
src/common/w32_dirent.c
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* w32_dirent.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
|
||||
|
||||
DIR *
|
||||
opendir ( const char *name )
|
||||
{
|
||||
DIR *dir;
|
||||
|
||||
dir = calloc (1, sizeof *dir + strlen (name));
|
||||
if (!dir)
|
||||
return NULL;
|
||||
strcpy (dir->dd_name, name);
|
||||
return dir;
|
||||
}
|
||||
|
||||
int
|
||||
closedir (DIR *dir)
|
||||
{
|
||||
FindClose( (HANDLE)dir->dd_handle );
|
||||
free( dir );
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dirent *
|
||||
readdir( DIR *dir )
|
||||
{
|
||||
WIN32_FIND_DATA fInfo;
|
||||
struct dirent *xdirent;
|
||||
int ret;
|
||||
|
||||
if ( !dir->dd_handle )
|
||||
{
|
||||
char *dirname;
|
||||
|
||||
if (*dir->dd_name)
|
||||
{
|
||||
size_t n = strlen (dir->dd_name);
|
||||
dirname = malloc (n + 4 + 1);
|
||||
if (dirname) {
|
||||
strcpy (dirname, dir->dd_name);
|
||||
strcpy (dirname + n, "\\*.*");
|
||||
}
|
||||
}
|
||||
else
|
||||
dirname = strdup( "\\*.*" );
|
||||
if (!dirname)
|
||||
return NULL; /* Error. */
|
||||
|
||||
dir->dd_handle = (long)FindFirstFile( dirname, &fInfo );
|
||||
free( dirname );
|
||||
if ( !dir->dd_handle )
|
||||
ret = 0;
|
||||
else
|
||||
ret = 1;
|
||||
}
|
||||
else if ( dir->dd_handle != -1l )
|
||||
{
|
||||
ret = FindNextFile ((HANDLE)dir->dd_handle, &fInfo);
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
if ( !ret )
|
||||
return NULL;
|
||||
|
||||
xdirent = calloc ( 1, sizeof *xdirent);
|
||||
if (xdirent)
|
||||
{
|
||||
strncpy (xdirent->d_name, fInfo.cFileName, FILENAME_MAX -1 );
|
||||
xdirent->d_name[FILENAME_MAX-1] = 0;
|
||||
xdirent->d_namlen = strlen( xdirent->d_name );
|
||||
}
|
||||
return xdirent;
|
||||
}
|
117
src/common/w32_reg.c
Normal file
117
src/common/w32_reg.c
Normal file
|
@ -0,0 +1,117 @@
|
|||
/* w32_reg.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "w32lib.h"
|
||||
|
||||
char *read_w32_registry_string( char *parent, char *section, char *key )
|
||||
{
|
||||
HKEY hKey, rootKey;
|
||||
char *str;
|
||||
int ret;
|
||||
|
||||
char buf[ MAX_PATH ];
|
||||
DWORD bufsiz = sizeof( buf );
|
||||
|
||||
if (!parent || !strlen(parent))
|
||||
rootKey = HKEY_CURRENT_USER ;
|
||||
else if (!strcmp(parent, "HKCR") || !strcmp(parent,"HKEY_CLASSES_ROOT"))
|
||||
rootKey = HKEY_CLASSES_ROOT ;
|
||||
else if (!strcmp(parent, "HKCU") || !strcmp(parent,"HKEY_CURRENT_USER"))
|
||||
rootKey = HKEY_CURRENT_USER ;
|
||||
else if (!strcmp(parent, "HKLM") || !strcmp(parent,"HKEY_LOCAL_MACHINE"))
|
||||
rootKey = HKEY_LOCAL_MACHINE ;
|
||||
else if (!strcmp(parent, "HKU") || !strcmp(parent,"HKEY_USERS"))
|
||||
rootKey = HKEY_USERS ;
|
||||
else if (!strcmp(parent, "HKCC") || !strcmp(parent,"HKEY_CURRENT_CONFIG"))
|
||||
rootKey = HKEY_CURRENT_CONFIG ;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
str = NULL;
|
||||
ret = RegOpenKeyEx( rootKey, section, 0, KEY_READ, &hKey );
|
||||
if ( ERROR_SUCCESS == ret ){
|
||||
ret = RegQueryValueEx( hKey, key, 0, NULL,
|
||||
(LPBYTE)buf, &bufsiz );
|
||||
if ( ERROR_SUCCESS == ret ){
|
||||
str = strdup( buf );
|
||||
}
|
||||
RegCloseKey( hKey );
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
char *get_content_type_from_registry_with_ext( char *ext )
|
||||
{
|
||||
HKEY hKey, parent;
|
||||
int ret;
|
||||
char buf[ MAX_PATH ];
|
||||
DWORD bufsiz;
|
||||
char *section, *key, *value;
|
||||
|
||||
// parent : HKEY_CLASSES_ROOT
|
||||
// section : ".txt"
|
||||
parent = HKEY_CLASSES_ROOT;
|
||||
section = malloc ( 1 + strlen (ext) + 1);
|
||||
if (!section)
|
||||
return NULL;
|
||||
*section = '.';
|
||||
strcpy (section+1, ext);
|
||||
|
||||
value = NULL;
|
||||
while ( 1 ) {
|
||||
ret = RegOpenKeyEx( parent, section, 0, KEY_READ, &hKey );
|
||||
if ( ERROR_SUCCESS != ret ) {
|
||||
// If section is not found...
|
||||
value = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
// key : "Content Type"
|
||||
key = "Content Type";
|
||||
bufsiz = sizeof( buf );
|
||||
ret = RegQueryValueEx( hKey, key, 0, NULL, (LPBYTE)buf, &bufsiz );
|
||||
if ( ERROR_SUCCESS == ret ) {
|
||||
// If value is found!
|
||||
RegCloseKey( hKey );
|
||||
value = strdup( buf );
|
||||
break;
|
||||
}
|
||||
|
||||
key = "";
|
||||
bufsiz = sizeof( buf );
|
||||
ret = RegQueryValueEx( hKey, key, 0, NULL, (LPBYTE)buf, &bufsiz );
|
||||
if ( ERROR_SUCCESS != ret ) {
|
||||
RegCloseKey( hKey );
|
||||
value = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
RegCloseKey( hKey );
|
||||
free( section );
|
||||
section = strdup( buf );
|
||||
break; //XXX:tm-gtk2
|
||||
}
|
||||
|
||||
free( section );
|
||||
return value;
|
||||
}
|
30
src/common/w32_signal.c
Normal file
30
src/common/w32_signal.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* w32_signal.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
int kill( pid_t pid, int sig ){
|
||||
return -1;
|
||||
}
|
32
src/common/w32_stat.c
Normal file
32
src/common/w32_stat.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* w32_stat.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
int lstat( const char *file_name, struct stat *buf ){
|
||||
return stat( file_name, buf );
|
||||
}
|
||||
|
12
src/common/w32_stdio.c
Normal file
12
src/common/w32_stdio.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
FILE *popen( const char *command, const char *type ){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int pclose( FILE *stream ){
|
||||
return -1;
|
||||
}
|
38
src/common/w32_stdlib.c
Normal file
38
src/common/w32_stdlib.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* w32_stdlib.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
long int random( void ){
|
||||
return rand();
|
||||
}
|
||||
|
||||
void srandom( unsigned int seed ){
|
||||
srand( seed );
|
||||
}
|
||||
|
||||
int truncate( const char *path, off_t length ){
|
||||
return -1;
|
||||
}
|
54
src/common/w32_string.c
Normal file
54
src/common/w32_string.c
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* w32_string.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
int strcasecmp( const char *s1, const char *s2 ){
|
||||
size_t len1, len2, len;
|
||||
|
||||
len1 = strlen( s1 );
|
||||
len2 = strlen( s2 );
|
||||
len = ( len1 > len2 )? len1 : len2;
|
||||
|
||||
return strncasecmp( s1, s2, len );
|
||||
}
|
||||
|
||||
int strncasecmp( const char *s1, const char *s2, size_t n ){
|
||||
int c1;
|
||||
int c2;
|
||||
|
||||
while (n--) {
|
||||
c1 = tolower(*(const unsigned char*)s1++);
|
||||
c2 = tolower(*(const unsigned char*)s2++);
|
||||
if (c1 != c2)
|
||||
return c1 - c2;
|
||||
else if (c1 == 0 && c2 == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
35
src/common/w32_time.c
Normal file
35
src/common/w32_time.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* w32_time.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
int gettimeofday( struct timeval *tv, struct timezone *tz ){
|
||||
struct _timeb tstruct;
|
||||
_ftime( &tstruct );
|
||||
tv->tv_sec = tstruct.time ;
|
||||
tv->tv_usec = tstruct.millitm;
|
||||
return 1;
|
||||
}
|
55
src/common/w32_unistd.c
Normal file
55
src/common/w32_unistd.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/* w32_unistd.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
uid_t getuid( void ){
|
||||
return 1;
|
||||
}
|
||||
|
||||
int setpgid( pid_t pid, pid_t pgid ){
|
||||
return -1;
|
||||
}
|
||||
|
||||
pid_t getppid( void ){
|
||||
return -1;
|
||||
}
|
||||
|
||||
pid_t fork( void ){
|
||||
return -1;
|
||||
}
|
||||
|
||||
unsigned int sleep( unsigned int seconds ){
|
||||
_sleep( seconds );
|
||||
return 0;
|
||||
}
|
||||
|
||||
int link( const char *oldpath, const char *newpath ){
|
||||
return -1;
|
||||
}
|
||||
|
||||
int usleep( unsigned long usec ){
|
||||
return sleep( 1 );
|
||||
}
|
30
src/common/w32_wait.c
Normal file
30
src/common/w32_wait.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* w32_wait.c - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* For more information and a list of changes, see w32lib.h
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "w32lib.h"
|
||||
|
||||
pid_t waitpid( pid_t pid, int *status, int options ){
|
||||
return -1;
|
||||
}
|
195
src/common/w32lib.h
Normal file
195
src/common/w32lib.h
Normal file
|
@ -0,0 +1,195 @@
|
|||
/* w32lib.h - Posix emulation layer for Sylpheed (Claws)
|
||||
*
|
||||
* This file is part of w32lib.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* w32lib 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.
|
||||
*
|
||||
* The code has been taken from the package
|
||||
* http://claws.sylpheed.org/win32/sylpheed/w32lib-dev-2004.2.3.0.zip
|
||||
* on 2005-11-17 by Werner Koch <wk@gnupg.org>. There are no regular
|
||||
* copyright notices but the file version.rc from the ZIP archive
|
||||
* claims:
|
||||
*
|
||||
* #define FILEVER "2004.2.3.0\0"
|
||||
* #define PRODVER "2004.2.3\0"
|
||||
*
|
||||
* [...]
|
||||
* VALUE "FileDescription", "Posix emulation layer for Sylpheed (Claws)\0"
|
||||
* VALUE "FileVersion", FILEVER
|
||||
* VALUE "ProductVersion", PRODVER
|
||||
* VALUE "LegalCopyright", "GPL\0"
|
||||
* VALUE "CompanyName", "GNU / Free Software Foundation\0"
|
||||
* VALUE "ProductName", "w32lib\0"
|
||||
*
|
||||
* Along with the fact that Sylpheed is under the GPL we can assume
|
||||
* that this code is under the GPL. No author information or
|
||||
* changelogs have been found.
|
||||
* Files taken form the package are:
|
||||
* w32_dirent.c w32_reg.c w32_stat.c w32_stdlib.c w32_time.c w32_wait.c
|
||||
* w32_gettext.c w32_signal.c w32_stdio.c w32_string.c w32_unistd.c
|
||||
*/
|
||||
|
||||
/* Changes are:
|
||||
|
||||
2005-11-17 Werner Koch <wk@g10code.com>
|
||||
|
||||
Add boilerplate text to all files and explain legal status.
|
||||
|
||||
* w32_reg.c: Replaced g_free and g_strdup by regular C functions.
|
||||
(get_content_type_from_registry_with_ext): Ditto.
|
||||
* w32_dirent.c (readdir): Ditto.
|
||||
(opendir): Ditto.
|
||||
(closedir): Reformatted.
|
||||
(readdir): Reformatted, replaced use of g_strdup_printf and other
|
||||
g-style malloc function by regular ones. Use DIR structure from mingw.
|
||||
* w32lib.h: Don't define finddata_t for mingw. Replaced replacement
|
||||
DIR structure by the one form mingw. Allocate filename in dirent
|
||||
statically to match the defintion ussed by mingw.
|
||||
* w32_reg.c (read_w32_registry_string): Return error for invalid root
|
||||
key.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _W32LIB_H_
|
||||
#define _W32LIB_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <wchar.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
/* types */
|
||||
/*** ??? ***/
|
||||
#ifndef __MINGW32__
|
||||
typedef long int off_t;
|
||||
typedef int pid_t;
|
||||
typedef unsigned char u_char;
|
||||
#endif /* __MINGW32__ */
|
||||
typedef unsigned int uid_t;
|
||||
|
||||
#ifndef __MINGW32__
|
||||
/*** stat ***/
|
||||
#define S_IRUSR _S_IREAD
|
||||
#define S_IWUSR _S_IWRITE
|
||||
#define S_IXUSR _S_IEXEC
|
||||
#define S_IRWXU (_S_IREAD|_S_IWRITE|_S_IEXEC)
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
|
||||
/* (signal?) */
|
||||
#define SIGPIPE _S_IFIFO
|
||||
|
||||
|
||||
/* (directory) */
|
||||
#define __S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
|
||||
#ifndef __MINGW32__
|
||||
#define S_ISFIFO(mode) __S_ISTYPE((mode), _S_IFIFO)
|
||||
#define S_ISDIR(mode) __S_ISTYPE((mode), _S_IFDIR)
|
||||
#define S_ISREG(mode) __S_ISTYPE((mode), _S_IFREG)
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
/* functions */
|
||||
/*** str ***/
|
||||
int strcasecmp( const char *s1, const char *s2 );
|
||||
|
||||
int strncasecmp( const char *s1, const char *s2, size_t n );
|
||||
|
||||
/*** dir ***/
|
||||
#ifndef __MINGW32__
|
||||
typedef void * HANDLE;
|
||||
|
||||
#ifndef _FINDDATA_T_DEFINED
|
||||
typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
|
||||
struct _finddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create; /* -1 for FAT file systems */
|
||||
time_t time_access; /* -1 for FAT file systems */
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
char name[260];
|
||||
};
|
||||
#endif /* !_FINDDATA_T_DEFINED */
|
||||
|
||||
struct dirent {
|
||||
long d_ino;
|
||||
unsigned short d_reclen;
|
||||
unsigned short d_namlen;
|
||||
char d_name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct _finddata_t dd_dta;
|
||||
struct dirent dd_dir;
|
||||
long dd_handle;
|
||||
int dd_stat;
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
|
||||
#endif /* !__MINGW32__ */
|
||||
|
||||
|
||||
DIR *opendir( const char *name );
|
||||
int closedir( DIR *dir );
|
||||
struct dirent *readdir( DIR *dir );
|
||||
|
||||
#ifdef __MINGW32__
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*** stat ***/
|
||||
int lstat( const char *file_name, struct stat *buf );
|
||||
|
||||
/*** sys/wait ***/
|
||||
pid_t waitpid( pid_t pid, int *status, int options );
|
||||
|
||||
/*** sys/time ***/
|
||||
int gettimeofday( struct timeval *tv, struct timezone *tz );
|
||||
|
||||
/*** unistd ***/
|
||||
uid_t getuid( void );
|
||||
int setpgid( pid_t pid, pid_t pgid );
|
||||
pid_t getppid( void );
|
||||
pid_t fork( void );
|
||||
unsigned int sleep( unsigned int seconds );
|
||||
int link( const char *oldpath, const char *newpath );
|
||||
int usleep( unsigned long usec );
|
||||
|
||||
/*** stdlib ***/
|
||||
long int random( void );
|
||||
void srandom( unsigned int seed );
|
||||
int truncate( const char *path, off_t length );
|
||||
|
||||
/*** signal ***/
|
||||
int kill( pid_t pid, int sig );
|
||||
|
||||
/*** stdio ***/
|
||||
FILE *popen( const char *command, const char *type );
|
||||
int pclose( FILE *stream );
|
||||
|
||||
/*** misc ***/
|
||||
char *read_w32_registry_string( char *parent, char *section, char *key );
|
||||
char *get_content_type_from_registry_with_ext( char *ext );
|
||||
|
||||
#endif
|
|
@ -72,7 +72,9 @@
|
|||
#endif
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#ifndef G_OS_WIN32 /* fixme we should have a configure test. */
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#if (HAVE_WCTYPE_H && HAVE_WCHAR_H)
|
||||
# include <wchar.h>
|
||||
|
|
|
@ -16,8 +16,8 @@ sylpheedetpaninclude_HEADERS = \
|
|||
imap-thread.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I../common \
|
||||
-I.. \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src \
|
||||
$(GTK_CFLAGS) \
|
||||
$(LIBETPAN_CFLAGS)
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
* Export address book to HTML file.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
@ -34,6 +38,11 @@
|
|||
#include "exporthtml.h"
|
||||
#include "xmlprops.h"
|
||||
|
||||
#ifdef MKDIR_TAKES_ONE_ARG
|
||||
#undef mkdir
|
||||
#define mkdir(a,b) mkdir(a)
|
||||
#endif
|
||||
|
||||
#define DFL_DIR_SYLPHEED_OUT "sylpheed-out"
|
||||
#define DFL_FILE_SYLPHEED_OUT "addressbook.html"
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
/*
|
||||
* Export address book to LDIF file.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
@ -35,6 +38,12 @@
|
|||
#include "xmlprops.h"
|
||||
#include "ldif.h"
|
||||
|
||||
|
||||
#ifdef MKDIR_TAKES_ONE_ARG
|
||||
#undef mkdir
|
||||
#define mkdir(a,b) mkdir(a)
|
||||
#endif
|
||||
|
||||
#define DFL_DIR_SYLPHEED_OUT "sylpheed-out"
|
||||
#define DFL_FILE_SYLPHEED_OUT "addressbook.ldif"
|
||||
|
||||
|
|
15
src/folder.c
15
src/folder.c
|
@ -31,6 +31,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef WIN32
|
||||
#include <w32lib.h>
|
||||
#endif
|
||||
|
||||
#include "folder.h"
|
||||
#include "session.h"
|
||||
|
@ -56,6 +59,18 @@
|
|||
#include "prefs_common.h"
|
||||
#include "prefs_account.h"
|
||||
|
||||
/* Define possible missing constants for Windows. */
|
||||
#ifdef G_OS_WIN32
|
||||
# ifndef S_IRGRP
|
||||
# define S_IRGRP 0
|
||||
# define S_IWGRP 0
|
||||
# endif
|
||||
# ifndef S_IROTH
|
||||
# define S_IROTH 0
|
||||
# define S_IWOTH 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static GList *folder_list = NULL;
|
||||
static GSList *class_list = NULL;
|
||||
static GSList *folder_unloaded_list = NULL;
|
||||
|
|
|
@ -61,8 +61,8 @@ sylpheedgtkinclude_HEADERS = \
|
|||
sylpheed-marshal.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I../common \
|
||||
-I.. \
|
||||
-I$(srcdir)/../common \
|
||||
-I$(srcdir)/.. \
|
||||
$(GTK_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS) \
|
||||
$(ASPELL_CFLAGS) \
|
||||
|
|
|
@ -229,7 +229,7 @@ void sylpheed_gtk_idle(void)
|
|||
{
|
||||
while(gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
usleep(50000);
|
||||
g_usleep(50000);
|
||||
}
|
||||
|
||||
gboolean defer_check_all(void *data)
|
||||
|
@ -371,6 +371,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
CHDIR_RETURN_VAL_IF_FAIL(get_rc_dir(), 1);
|
||||
|
||||
MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir());
|
||||
MAKE_DIR_IF_NOT_EXIST(get_imap_cache_dir());
|
||||
MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir());
|
||||
MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir());
|
||||
|
@ -1123,6 +1124,7 @@ static void quit_signal_handler(int sig)
|
|||
|
||||
static void install_basic_sighandlers()
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
sigset_t mask;
|
||||
struct sigaction act;
|
||||
|
||||
|
@ -1153,4 +1155,5 @@ static void install_basic_sighandlers()
|
|||
#endif
|
||||
|
||||
sigprocmask(SIG_UNBLOCK, &mask, 0);
|
||||
#endif /* !G_OS_WIN32 */
|
||||
}
|
||||
|
|
16
src/manual.c
16
src/manual.c
|
@ -30,17 +30,33 @@
|
|||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#if !defined(LC_MESSAGES) && defined(G_OS_WIN32)
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "prefs_common.h"
|
||||
#include "manual.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
static gchar *get_language()
|
||||
{
|
||||
gchar *language;
|
||||
gchar *c;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
language = g_strdup(gtk_set_locale());
|
||||
#else
|
||||
/* FIXME: Why not using gtk_set_locale here too? -wk */
|
||||
language = g_strdup(setlocale(LC_MESSAGES, NULL));
|
||||
#endif
|
||||
/* At least under W32 it is possible that gtk_set_locate
|
||||
returns NULL. This is not documented but well, it happens
|
||||
and g_strdup is happy with a NULL argument. We return a
|
||||
standard language string in this case. */
|
||||
if (!language)
|
||||
return g_strdup("en");
|
||||
if((c = strchr(language, ',')) != NULL)
|
||||
*c = '\0';
|
||||
if((c = strchr(language, '_')) != NULL)
|
||||
|
|
13
src/mh.c
13
src/mh.c
|
@ -44,6 +44,19 @@
|
|||
#include "utils.h"
|
||||
#include "codeconv.h"
|
||||
|
||||
/* Define possible missing constants for Windows. */
|
||||
#ifdef G_OS_WIN32
|
||||
# ifndef S_IRGRP
|
||||
# define S_IRGRP 0
|
||||
# define S_IWGRP 0
|
||||
# endif
|
||||
# ifndef S_IROTH
|
||||
# define S_IROTH 0
|
||||
# define S_IWOTH 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
static void mh_folder_init (Folder *folder,
|
||||
const gchar *name,
|
||||
const gchar *path);
|
||||
|
|
|
@ -371,8 +371,10 @@ static void mimeview_free_mimeinfo(MimeView *mimeview)
|
|||
if (mimeview->mimeinfo != NULL && !defer)
|
||||
procmime_mimeinfo_free_all(mimeview->mimeinfo);
|
||||
else if (defer) {
|
||||
#ifdef USE_PTHREAD
|
||||
debug_print("deferring free(mimeinfo) and cancelling check\n");
|
||||
mimeview_check_sig_cancel_now(mimeview);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ clamav_plugin_la_LDFLAGS = \
|
|||
$(CLAMAV_LIBS)
|
||||
|
||||
INCLUDES = \
|
||||
-I../.. \
|
||||
-I../../common \
|
||||
-I../../gtk
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/gtk
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(ASPELL_CFLAGS) \
|
||||
|
|
|
@ -9,7 +9,8 @@ demo_la_LDFLAGS = \
|
|||
-avoid-version -module
|
||||
|
||||
INCLUDES = \
|
||||
-I../../common
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS)
|
||||
|
|
|
@ -11,9 +11,9 @@ dillo_viewer_la_LDFLAGS = \
|
|||
$(GTK_LIBS)
|
||||
|
||||
INCLUDES = \
|
||||
-I../.. \
|
||||
-I../../common \
|
||||
-I../../gtk
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/gtk
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(ASPELL_CFLAGS) \
|
||||
|
|
|
@ -1,3 +1,37 @@
|
|||
EXTRA_DIST = version.rc plugin.def sylpheed.def
|
||||
|
||||
if PLATFORM_WIN32
|
||||
|
||||
LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
|
||||
`echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
|
||||
sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
|
||||
|
||||
%.lo : %.rc
|
||||
$(LTRCCOMPILE) -i $< -o $@
|
||||
|
||||
plugin_res = version.lo
|
||||
plugin_res_ldflag = -Wl,.libs/version.o
|
||||
|
||||
no_undefined = -no-undefined
|
||||
export_symbols = -export-symbols $(srcdir)/plugin.def
|
||||
|
||||
plugin_deps = libsylpheed.a $(plugin_res) plugin.def
|
||||
|
||||
libsylpheed.a: sylpheed.def
|
||||
$(DLLTOOL) --output-lib $@ --def $<
|
||||
|
||||
plugin_ldadd = -L . -lsylpheed
|
||||
|
||||
else
|
||||
plugin_res =
|
||||
plugin_res_ldflag =
|
||||
no_undefined =
|
||||
export_symbols =
|
||||
plugin_deps =
|
||||
plugin_ldadd =
|
||||
endif
|
||||
|
||||
|
||||
plugindir = $(pkglibdir)/plugins
|
||||
|
||||
plugin_LTLIBRARIES = pgpcore.la
|
||||
|
@ -17,17 +51,24 @@ plugininclude_HEADERS = \
|
|||
sgpgme.h
|
||||
|
||||
pgpcore_la_LDFLAGS = \
|
||||
$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
|
||||
-avoid-version -module \
|
||||
$(GTK_LIBS) \
|
||||
$(GPGME_LIBS)
|
||||
pgpcore_la_DEPENDENCIES = $(plugin_deps)
|
||||
pgpcore_la_LIBADD = $(plugin_ldadd)
|
||||
|
||||
INCLUDES = \
|
||||
-I../../ \
|
||||
-I../../common \
|
||||
-I../../gtk
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/gtk
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GPGME_CFLAGS) \
|
||||
-Wno-deprecated-declarations
|
||||
|
||||
clean-local:
|
||||
rm -f libsylpheed.a
|
||||
|
||||
|
|
|
@ -43,7 +43,11 @@
|
|||
#include <gtk/gtksignal.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef G_OS_WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "passphrase.h"
|
||||
#include "prefs_common.h"
|
||||
|
@ -283,7 +287,9 @@ create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad)
|
|||
static int free_passphrase(gpointer _unused)
|
||||
{
|
||||
if (last_pass != NULL) {
|
||||
#ifndef G_OS_WIN32
|
||||
munlock(last_pass, strlen(last_pass));
|
||||
#endif
|
||||
g_free(last_pass);
|
||||
last_pass = NULL;
|
||||
debug_print("%% passphrase removed");
|
||||
|
@ -298,11 +304,9 @@ gpgmegtk_passphrase_cb(void *opaque, const char *uid_hint,
|
|||
{
|
||||
const char *pass;
|
||||
|
||||
if (prefs_gpg_get_config()->store_passphrase && last_pass != NULL && !prev_bad) {
|
||||
write(fd, last_pass, strlen(last_pass));
|
||||
write(fd, "\n", 1);
|
||||
return GPG_ERR_NO_ERROR;
|
||||
}
|
||||
if (prefs_gpg_get_config()->store_passphrase && last_pass && !prev_bad)
|
||||
pass = last_pass;
|
||||
else {
|
||||
gpgmegtk_set_passphrase_grab (prefs_gpg_get_config()->passphrase_grab);
|
||||
debug_print ("%% requesting passphrase for '%s': ", uid_hint);
|
||||
pass = passphrase_mbox (uid_hint, passphrase_hint, prev_bad);
|
||||
|
@ -315,18 +319,31 @@ gpgmegtk_passphrase_cb(void *opaque, const char *uid_hint,
|
|||
else {
|
||||
if (prefs_gpg_get_config()->store_passphrase) {
|
||||
last_pass = g_strdup(pass);
|
||||
#ifndef G_OS_WIN32
|
||||
if (mlock(last_pass, strlen(last_pass)) == -1)
|
||||
debug_print("%% locking passphrase failed");
|
||||
|
||||
#endif
|
||||
if (prefs_gpg_get_config()->store_passphrase_timeout > 0) {
|
||||
gtk_timeout_add(prefs_gpg_get_config()->store_passphrase_timeout*60*1000,
|
||||
gtk_timeout_add(prefs_gpg_get_config()
|
||||
->store_passphrase_timeout*60*1000,
|
||||
free_passphrase, NULL);
|
||||
}
|
||||
}
|
||||
debug_print ("%% sending passphrase");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
{
|
||||
/* Under Windows FD is actually a System handle. */
|
||||
DWORD nwritten;
|
||||
WriteFile ((HANDLE)fd, pass, strlen (pass), &nwritten, NULL);
|
||||
WriteFile ((HANDLE)fd, "\n", 1, &nwritten, NULL);
|
||||
}
|
||||
#else
|
||||
write(fd, pass, strlen(pass));
|
||||
write(fd, "\n", 1);
|
||||
#endif
|
||||
return GPG_ERR_NO_ERROR;
|
||||
}
|
||||
|
||||
|
|
18
src/plugins/pgpcore/plugin.def
Normal file
18
src/plugins/pgpcore/plugin.def
Normal file
|
@ -0,0 +1,18 @@
|
|||
EXPORTS
|
||||
plugin_desc
|
||||
plugin_done
|
||||
plugin_init
|
||||
plugin_name
|
||||
plugin_type
|
||||
|
||||
sgpgme_data_from_mimeinfo
|
||||
sgpgme_decrypt_verify
|
||||
sgpgme_get_encrypt_data
|
||||
sgpgme_setup_signers
|
||||
sgpgme_sigstat_gpgme_to_privacy
|
||||
sgpgme_sigstat_info_full
|
||||
sgpgme_sigstat_info_short
|
||||
sgpgme_verify_signature
|
||||
|
||||
gpgmegtk_passphrase_cb
|
||||
prefs_gpg_get_config
|
|
@ -423,9 +423,13 @@ gboolean sgpgme_setup_signers(gpgme_ctx_t ctx, PrefsAccount *account)
|
|||
void sgpgme_init()
|
||||
{
|
||||
gpgme_engine_info_t engineInfo;
|
||||
if (gpgme_check_version("0.4.5")) {
|
||||
if (gpgme_check_version("1.0.0")) {
|
||||
#ifdef LC_CTYPE
|
||||
gpgme_set_locale(NULL, LC_CTYPE, setlocale(LC_CTYPE, NULL));
|
||||
#endif
|
||||
#ifdef LC_MESSAGES
|
||||
gpgme_set_locale(NULL, LC_MESSAGES, setlocale(LC_MESSAGES, NULL));
|
||||
#endif
|
||||
if (!gpgme_get_engine_info(&engineInfo)) {
|
||||
while (engineInfo) {
|
||||
debug_print("GpgME Protocol: %s\n Version: %s\n",
|
||||
|
|
30
src/plugins/pgpcore/sylpheed.def
Normal file
30
src/plugins/pgpcore/sylpheed.def
Normal file
|
@ -0,0 +1,30 @@
|
|||
LIBRARY SYLPHEED-CLAWS.EXE
|
||||
EXPORTS
|
||||
alertpanel
|
||||
alertpanel_full
|
||||
copy_file_part
|
||||
debug_print_real
|
||||
get_rc_dir
|
||||
get_tmp_file
|
||||
gtkut_stock_button_set_create
|
||||
input_dialog
|
||||
mainwindow_get_mainwindow
|
||||
manage_window_destroy
|
||||
manage_window_focus_in
|
||||
manage_window_focus_out
|
||||
manage_window_set_transient
|
||||
manage_window_unmap
|
||||
prefs_account_get_privacy_prefs
|
||||
prefs_account_register_page
|
||||
prefs_account_set_privacy_prefs
|
||||
prefs_account_unregister_page
|
||||
prefs_file_close
|
||||
prefs_file_close_revert
|
||||
prefs_gtk_register_page
|
||||
prefs_gtk_unregister_page
|
||||
prefs_read_config
|
||||
prefs_set_block_label
|
||||
prefs_set_default
|
||||
prefs_write_open
|
||||
prefs_write_param
|
||||
sylpheed_get_version
|
36
src/plugins/pgpcore/version.rc
Normal file
36
src/plugins/pgpcore/version.rc
Normal file
|
@ -0,0 +1,36 @@
|
|||
1 VERSIONINFO
|
||||
FILEVERSION 0, 0, 0, 0
|
||||
PRODUCTVERSION 0, 0, 0, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "pgpcore Plugin\0"
|
||||
VALUE "FileVersion", "0.0.0.0\0"
|
||||
VALUE "ProductVersion", "0.0.0.0 Win32\0"
|
||||
VALUE "LegalCopyright", "GPL / © 1999-2003 Hiroyuki Yamamoto & The Sylpheed Claws Team\0"
|
||||
VALUE "CompanyName", "GNU / Free Software Foundation\0"
|
||||
VALUE "ProductName", "Sylpheed-Claws\0"
|
||||
// VALUE "Comments", "\0"
|
||||
// VALUE "InternalName", "\0"
|
||||
// VALUE "LegalTrademarks", "\0"
|
||||
// VALUE "OriginalFilename", "\0"
|
||||
// VALUE "PrivateBuild", "\0"
|
||||
// VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0, 1200
|
||||
END
|
||||
END
|
|
@ -1,10 +1,43 @@
|
|||
EXTRA_DIST = version.rc plugin.def sylpheed.def pgpinline.deps
|
||||
|
||||
|
||||
if PLATFORM_WIN32
|
||||
|
||||
LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
|
||||
`echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
|
||||
sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
|
||||
|
||||
%.lo : %.rc
|
||||
$(LTRCCOMPILE) -i $< -o $@
|
||||
|
||||
plugin_res = version.lo
|
||||
plugin_res_ldflag = -Wl,.libs/version.o
|
||||
|
||||
no_undefined = -no-undefined
|
||||
export_symbols = -export-symbols $(srcdir)/plugin.def
|
||||
|
||||
plugin_deps = libsylpheed.a $(plugin_res) plugin.def
|
||||
|
||||
libsylpheed.a: sylpheed.def
|
||||
$(DLLTOOL) --output-lib $@ --def $<
|
||||
|
||||
plugin_ldadd = -L . -lsylpheed
|
||||
|
||||
else
|
||||
plugin_res =
|
||||
plugin_res_ldflag =
|
||||
no_undefined =
|
||||
export_symbols =
|
||||
plugin_deps =
|
||||
plugin_ldadd =
|
||||
endif
|
||||
|
||||
|
||||
plugindir = $(pkglibdir)/plugins
|
||||
plugin_DATA=pgpinline.deps
|
||||
|
||||
plugin_LTLIBRARIES = pgpinline.la
|
||||
|
||||
EXTRA_DIST=pgpinline.deps
|
||||
|
||||
pgpinline_la_SOURCES = \
|
||||
plugin.c \
|
||||
pgpinline.c
|
||||
|
@ -14,18 +47,23 @@ plugininclude_HEADERS = \
|
|||
pgpinline.h
|
||||
|
||||
pgpinline_la_LDFLAGS = \
|
||||
$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
|
||||
-avoid-version -module \
|
||||
$(GTK_LIBS) \
|
||||
$(GPGME_LIBS)
|
||||
|
||||
pgpinline_la_DEPENDENCIES = $(plugin_deps)
|
||||
pgpinline_la_LIBADD = $(plugin_ldadd)
|
||||
|
||||
INCLUDES = \
|
||||
-I../../ \
|
||||
-I../../common \
|
||||
-I../../gtk
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/gtk
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GPGME_CFLAGS) \
|
||||
-Wno-deprecated-declarations
|
||||
|
||||
clean-local:
|
||||
rm -f libsylpheed.a
|
||||
|
|
6
src/plugins/pgpinline/plugin.def
Normal file
6
src/plugins/pgpinline/plugin.def
Normal file
|
@ -0,0 +1,6 @@
|
|||
EXPORTS
|
||||
plugin_desc
|
||||
plugin_done
|
||||
plugin_init
|
||||
plugin_name
|
||||
plugin_type
|
27
src/plugins/pgpinline/sylpheed.def
Normal file
27
src/plugins/pgpinline/sylpheed.def
Normal file
|
@ -0,0 +1,27 @@
|
|||
LIBRARY SYLPHEED-CLAWS.EXE
|
||||
EXPORTS
|
||||
codeconv_set_strict
|
||||
conv_codeset_strdup
|
||||
conv_get_locale_charset_str_no_utf8
|
||||
debug_print_real
|
||||
get_mime_tmp_dir
|
||||
gpgmegtk_passphrase_cb
|
||||
my_tmpfile
|
||||
prefs_gpg_get_config
|
||||
privacy_register_system
|
||||
privacy_unregister_system
|
||||
procmime_decode_content
|
||||
procmime_encode_content
|
||||
procmime_mimeinfo_free_all
|
||||
procmime_mimeinfo_get_parameter
|
||||
procmime_mimeinfo_parent
|
||||
procmime_scan_file
|
||||
procmime_write_mimeinfo
|
||||
sgpgme_decrypt_verify
|
||||
sgpgme_get_encrypt_data
|
||||
sgpgme_setup_signers
|
||||
sgpgme_sigstat_gpgme_to_privacy
|
||||
sgpgme_sigstat_info_full
|
||||
sgpgme_sigstat_info_short
|
||||
sgpgme_verify_signature
|
||||
sylpheed_get_version
|
36
src/plugins/pgpinline/version.rc
Normal file
36
src/plugins/pgpinline/version.rc
Normal file
|
@ -0,0 +1,36 @@
|
|||
1 VERSIONINFO
|
||||
FILEVERSION 0, 0, 0, 0
|
||||
PRODUCTVERSION 0, 0, 0, 0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "pgpinline Plugin\0"
|
||||
VALUE "FileVersion", "0.0.0.0\0"
|
||||
VALUE "ProductVersion", "0.0.0.0 Win32\0"
|
||||
VALUE "LegalCopyright", "GPL / © 1999-2003 Hiroyuki Yamamoto & The Sylpheed Claws Team\0"
|
||||
VALUE "CompanyName", "GNU / Free Software Foundation\0"
|
||||
VALUE "ProductName", "Sylpheed-Claws\0"
|
||||
// VALUE "Comments", "\0"
|
||||
// VALUE "InternalName", "\0"
|
||||
// VALUE "LegalTrademarks", "\0"
|
||||
// VALUE "OriginalFilename", "\0"
|
||||
// VALUE "PrivateBuild", "\0"
|
||||
// VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0, 1200
|
||||
END
|
||||
END
|
|
@ -1,9 +1,45 @@
|
|||
EXTRA_DIST = version.rc plugin.def sylpheed.def mypgpcore.def pgpmime.deps
|
||||
|
||||
if PLATFORM_WIN32
|
||||
|
||||
LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
|
||||
`echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
|
||||
sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
|
||||
|
||||
%.lo : %.rc
|
||||
$(LTRCCOMPILE) -i $< -o $@
|
||||
|
||||
plugin_res = version.lo
|
||||
plugin_res_ldflag = -Wl,.libs/version.o
|
||||
|
||||
no_undefined = -no-undefined
|
||||
export_symbols = -export-symbols $(srcdir)/plugin.def
|
||||
|
||||
plugin_deps = libsylpheed.a libmypgpcore.a $(plugin_res) plugin.def
|
||||
|
||||
libsylpheed.a: sylpheed.def
|
||||
$(DLLTOOL) --output-lib $@ --def $<
|
||||
|
||||
libmypgpcore.a: mypgpcore.def
|
||||
$(DLLTOOL) --output-lib $@ --def $<
|
||||
|
||||
plugin_ldadd = -L . -lsylpheed -lmypgpcore
|
||||
|
||||
else
|
||||
plugin_res =
|
||||
plugin_res_ldflag =
|
||||
no_undefined =
|
||||
export_symbols =
|
||||
plugin_deps =
|
||||
plugin_ldadd =
|
||||
endif
|
||||
|
||||
|
||||
plugindir = $(pkglibdir)/plugins
|
||||
plugin_DATA=pgpmime.deps
|
||||
|
||||
plugin_LTLIBRARIES = pgpmime.la
|
||||
|
||||
EXTRA_DIST=pgpmime.deps
|
||||
|
||||
pgpmime_la_SOURCES = \
|
||||
plugin.c \
|
||||
|
@ -14,18 +50,23 @@ plugininclude_HEADERS = \
|
|||
pgpmime.h
|
||||
|
||||
pgpmime_la_LDFLAGS = \
|
||||
$(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
|
||||
-avoid-version -module \
|
||||
$(GTK_LIBS) \
|
||||
$(GPGME_LIBS)
|
||||
|
||||
pgpmime_la_DEPENDENCIES = $(plugin_deps)
|
||||
pgpmime_la_LIBADD = $(plugin_ldadd)
|
||||
|
||||
INCLUDES = \
|
||||
-I../../ \
|
||||
-I../../common \
|
||||
-I../../gtk
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-I$(top_srcdir)/src/gtk
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GPGME_CFLAGS) \
|
||||
-Wno-deprecated-declarations
|
||||
|
||||
clean-local:
|
||||
rm -f libsylpheed.a
|
||||
|
|
14
src/plugins/pgpmime/mypgpcore.def
Normal file
14
src/plugins/pgpmime/mypgpcore.def
Normal file
|
@ -0,0 +1,14 @@
|
|||
LIBRARY PGPCORE.DLL
|
||||
EXPORTS
|
||||
sgpgme_data_from_mimeinfo
|
||||
sgpgme_decrypt_verify
|
||||
sgpgme_get_encrypt_data
|
||||
sgpgme_setup_signers
|
||||
sgpgme_sigstat_gpgme_to_privacy
|
||||
sgpgme_sigstat_info_full
|
||||
sgpgme_sigstat_info_short
|
||||
sgpgme_verify_signature
|
||||
gpgmegtk_passphrase_cb
|
||||
prefs_gpg_get_config
|
||||
|
||||
|
6
src/plugins/pgpmime/plugin.def
Normal file
6
src/plugins/pgpmime/plugin.def
Normal file
|
@ -0,0 +1,6 @@
|
|||
EXPORTS
|
||||
plugin_desc
|
||||
plugin_done
|
||||
plugin_init
|
||||
plugin_name
|
||||
plugin_type
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue