*** kio/kio/kremoteencoding.cpp.old	2009-07-20 02:41:31.000000000 +0900
--- kio/kio/kremoteencoding.cpp	2009-06-05 15:28:55.000000000 +0900
***************
*** 28,34 ****
--- 28,38 ----
  {
    public:
      KRemoteEncodingPrivate()
+ #ifdef	ORIGINAL_CODE
        : m_codec(0)
+ #else
+       : m_codec(QTextCodec::codecForLocale())
+ #endif
      {
      }
  
***************
*** 105,111 ****
--- 109,119 ----
      d->m_codec = QTextCodec::codecForName(name);
  
    if (d->m_codec == 0)
+ #ifdef	ORIGINAL_CODE
      d->m_codec = QTextCodec::codecForMib( 106 ); // fallback to UTF-8
+ #else
+     d->m_codec = QTextCodec::codecForLocale();
+ #endif
  
    if (d->m_codec == 0)
      d->m_codec = QTextCodec::codecForMib(4 /* latin-1 */);
*** kio/kio/slavebase.cpp.old	2009-07-20 02:42:32.000000000 +0900
--- kio/kio/slavebase.cpp	2009-07-14 21:26:49.000000000 +0900
***************
*** 62,67 ****
--- 62,70 ----
  extern "C" {
      static void sigsegv_handler(int sig);
      static void sigpipe_handler(int sig);
+ #ifndef	ORIGINAL_CODE
+     static void sigpoll_handler(int sig);
+ #endif
  }
  
  using namespace KIO;
***************
*** 185,191 ****
--- 188,198 ----
          KDE_signal(SIGALRM,&sigsegv_handler);
          KDE_signal(SIGFPE,&sigsegv_handler);
  #ifdef SIGPOLL
+ #ifdef	ORIGINAL_CODE
          KDE_signal(SIGPOLL, &sigsegv_handler);
+ #else
+         KDE_signal(SIGPOLL, &sigpoll_handler);
+ #endif
  #endif
  #ifdef SIGSYS
          KDE_signal(SIGSYS, &sigsegv_handler);
***************
*** 720,725 ****
--- 727,742 ----
      d->sentListEntries+=(uint)list.count();
  }
  
+ #ifndef	ORIGINAL_CODE
+ static void sigpoll_handler(int sig)
+ {
+     char buffer[120];
+ 
+     qsnprintf(buffer, sizeof(buffer), "kioslave: sigpoll called\n");
+     write(2, buffer, strlen(buffer));
+     sigignore(SIGPOLL);
+ }
+ #endif
  static void sigsegv_handler(int sig)
  {
  #ifdef Q_OS_UNIX
