1 diff -ru hddtemp-0.3-beta15.orig/configure.in hddtemp-0.3-beta15/configure.in
2 --- hddtemp-0.3-beta15.orig/configure.in 2005-10-17 20:14:19.000000000 +0100
3 +++ hddtemp-0.3-beta15/configure.in 2008-06-27 00:00:46.000000000 +0100
5 # append the host alias to the tools for cross compiling
7 AC_CHECK_HEADERS(fcntl.h)
8 +AC_CHECK_HEADERS(iconv.h)
9 AC_CHECK_HEADERS(netinet/in.h)
10 AC_CHECK_TYPE(in_addr_t, ,[AC_DEFINE_UNQUOTED([in_addr_t], [uint32_t], [Define to 'uint32_t' if <netinet/in.h> does not define.])], [#include <netinet/in.h>])
14 #AM_GNU_GETTEXT([external])
16 +AC_CHECK_FUNCS([bindtextdomain textdomain iconv])
18 dnl reasonable guesses for where stuff is installed
19 dnl if we don't do that now, the config.h will use ${prefix}
20 dnl for DEFAULT_DATABASE_PATH.
21 diff -ru hddtemp-0.3-beta15.orig/src/hddtemp.c hddtemp-0.3-beta15/src/hddtemp.c
22 --- hddtemp-0.3-beta15.orig/src/hddtemp.c 2006-04-19 03:37:35.000000000 +0100
23 +++ hddtemp-0.3-beta15/src/hddtemp.c 2008-06-26 23:59:40.000000000 +0100
27 setlocale (LC_ALL, "");
28 +#ifdef HAVE_BINDTEXTDOMAIN
29 bindtextdomain (PACKAGE, LOCALEDIR);
31 +#ifdef HAVE_TEXTDOMAIN
35 show_db = debug = numeric = quiet = wakeup = af_hint = syslog_interval = 0;
37 diff -ru hddtemp-0.3-beta15.orig/src/utf8.c hddtemp-0.3-beta15/src/utf8.c
38 --- hddtemp-0.3-beta15.orig/src/utf8.c 2006-04-19 03:37:02.000000000 +0100
39 +++ hddtemp-0.3-beta15/src/utf8.c 2008-06-27 00:02:15.000000000 +0100
52 static char *iconv_from_utf8_to_locale(const char *string, const char* fallback_string)
55 const size_t buffer_inc = 80; // Increment buffer size in 80 bytes step
59 if (dest_buffer != NULL)
60 free(dest_buffer); // free buffer
61 free(src_buffer); // free string
64 return strdup(fallback_string); // and return fallback string