From 8107bdf22ded72a2abfe49bb8ccf29378934608a Mon Sep 17 00:00:00 2001 From: Mariusz Adamski Date: Tue, 14 Dec 2010 22:09:17 +0100 Subject: [PATCH] Unicode support --- NEWS | 1 + bootstrap.conf | 2 ++ configure.ac | 10 ++++++++++ src/common.h | 8 ++++++++ 4 files changed, 21 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index e234848..706d062 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ Major changes in release X.Y.Z * Include All Saints' day in HU * Fix build issue under solaris 10 / studio 12.1 +* Unicode support Major changes in release 3.6 diff --git a/bootstrap.conf b/bootstrap.conf index 5d485ec..44cb155 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -75,6 +75,8 @@ tmpdir time unlink write +unistr/u8-strlen +unistdio/u8-sprintf " gnulib_extra_files=" diff --git a/configure.ac b/configure.ac index 71fb53e..9fc6a76 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,16 @@ dnl AC_MSG_RESULT() AC_CHECKING(for $PACKAGE specific package options) dnl +AC_MSG_CHECKING(whether unicode support is required) +AC_ARG_ENABLE(unicode, + [ --enable-unicode use unicode], + gcal_cv_use_unicode=$enableval, + gcal_cv_use_unicode=no) +AC_MSG_RESULT($gcal_cv_use_unicode) +if test "$gcal_cv_use_unicode" = yes; then + AC_DEFINE(USE_UNICODE, [1], [Enable unicode.]) +fi +dnl AC_MSG_CHECKING(whether extended ASCII character set is required) AC_ARG_ENABLE(easc, [ --enable-easc use extended ASCII character set], diff --git a/src/common.h b/src/common.h index fee3d64..2266e9c 100644 --- a/src/common.h +++ b/src/common.h @@ -34,6 +34,14 @@ /* * Include (sub)header files ;< */ +# if USE_UNICODE +# include "unistdio.h" +# include "unistr.h" +# undef sprintf +# define sprintf u8_sprintf +# undef strlen +# define strlen u8_strlen +# endif # if HAVE_STDIO_H || STDC_HEADERS # include # endif -- 1.7.2.2