specs/patches/scim-bridge-0.4.14-on-nv-ss11-patch.diff
changeset 706 ca594d31f781
parent 705 c5b0af57a88c
child 707 dfbe6c035259
equal deleted inserted replaced
705:c5b0af57a88c 706:ca594d31f781
     1 diff -ur Makefile.am Makefile.am
       
     2 --- Makefile.am	2007-12-05 22:50:59.000000000 +0800
       
     3 +++ Makefile.am	2007-12-26 17:02:27.592966401 +0800
       
     4 @@ -27,7 +27,7 @@
       
     5  EXTRA_DIST		= config.rpath m4/ChangeLog bootstrap intltool-extract.in intltool-merge.in intltool-update.in
       
     6  
       
     7  AUTOMAKE_OPTIONS 	= gnu
       
     8 -SUBDIRS = po intl common client-common $(BUILD_DIR_GTK2_IMMODULE) $(BUILD_DIR_QT3_IMMODULE) $(BUILD_DIR_QT4_IMMODULE)  $(BUILD_DIR_AGENT) $(BUILD_DIR_TESTS) $(BUILD_DIR_DOCUMENTS)
       
     9 +SUBDIRS = po common client-common $(BUILD_DIR_GTK2_IMMODULE) $(BUILD_DIR_QT3_IMMODULE) $(BUILD_DIR_QT4_IMMODULE)  $(BUILD_DIR_AGENT) $(BUILD_DIR_TESTS) $(BUILD_DIR_DOCUMENTS)
       
    10  
       
    11  ## @start 1
       
    12  MAINTAINERCLEANFILES 	= Makefile.in aclocal.m4 configure config.h.in $(AUX_DIST)
       
    13 @@ -36,5 +36,5 @@
       
    14  
       
    15  DISTCLEANFILES = intltool-extract intltool-merge intltool-update
       
    16  
       
    17 -ACLOCAL_AMFLAGS = -I m4 
       
    18 +ACLOCAL_AMFLAGS =
       
    19  
       
    20 diff -ur agent/scim-bridge-agent-application.cpp agent/scim-bridge-agent-application.cpp
       
    21 --- agent/scim-bridge-agent-application.cpp	2007-11-07 21:09:35.000000000 +0800
       
    22 +++ agent/scim-bridge-agent-application.cpp	2007-12-26 17:04:05.235266866 +0800
       
    23 @@ -22,6 +22,7 @@
       
    24  #include <stdlib.h>
       
    25  #include <string.h>
       
    26  #include <unistd.h>
       
    27 +#include <locale.h>
       
    28  
       
    29  #include <iostream>
       
    30  
       
    31 diff -ur agent/scim-bridge-agent-client-listener.cpp agent/scim-bridge-agent-client-listener.cpp
       
    32 --- agent/scim-bridge-agent-client-listener.cpp	2007-11-07 18:15:52.000000000 +0800
       
    33 +++ agent/scim-bridge-agent-client-listener.cpp	2007-12-26 17:06:22.856705702 +0800
       
    34 @@ -21,6 +21,7 @@
       
    35  #include <errno.h>
       
    36  #include <unistd.h>
       
    37  #include <string.h>
       
    38 +#include <alloca.h>
       
    39  
       
    40  #include <sys/select.h>
       
    41  #include <sys/socket.h>
       
    42 diff -ur agent/scim-bridge-agent-output.cpp agent/scim-bridge-agent-output.cpp
       
    43 --- agent/scim-bridge-agent-output.cpp	2007-06-02 11:33:47.000000000 +0800
       
    44 +++ agent/scim-bridge-agent-output.cpp	2007-12-26 16:40:38.935190435 +0800
       
    45 @@ -71,10 +71,9 @@
       
    46  {
       
    47      if (!initialized) static_initialize ();
       
    48      
       
    49 -    char *expanded_format;
       
    50 -    vasprintf (&expanded_format, format, ap);
       
    51 +    char expanded_format[1024];
       
    52 +    vsnprintf (expanded_format, sizeof(expanded_format), format, ap);
       
    53      syslog (priority, "%s", expanded_format);
       
    54 -    free (expanded_format);
       
    55  }
       
    56  
       
    57  
       
    58 diff -ur agent/scim-bridge-agent.cpp agent/scim-bridge-agent.cpp
       
    59 --- agent/scim-bridge-agent.cpp	2007-12-05 22:54:04.000000000 +0800
       
    60 +++ agent/scim-bridge-agent.cpp	2007-12-26 17:05:32.428913654 +0800
       
    61 @@ -22,6 +22,7 @@
       
    62  #include <signal.h>
       
    63  #include <string.h>
       
    64  #include <unistd.h>
       
    65 +#include <locale.h>
       
    66  
       
    67  #include <sys/select.h>
       
    68  #include <sys/time.h>
       
    69 diff -ur agent/utils/scim-bridge-agent-panel-client.cpp agent/utils/scim-bridge-agent-panel-client.cpp
       
    70 --- agent/utils/scim-bridge-agent-panel-client.cpp	2007-06-02 11:33:47.000000000 +0800
       
    71 +++ agent/utils/scim-bridge-agent-panel-client.cpp	2007-12-26 16:40:38.941743738 +0800
       
    72 @@ -171,6 +171,47 @@
       
    73      scim_bridge_free_display (display);
       
    74  }
       
    75  
       
    76 +#ifndef HAVE_DAEMON
       
    77 +void closeall(int fd)
       
    78 +{
       
    79 +    int fdlimit = sysconf(_SC_OPEN_MAX);
       
    80 +
       
    81 +    while (fd < fdlimit)
       
    82 +      close(fd++);
       
    83 +}
       
    84 +
       
    85 +int daemon(int nochdir, int noclose)
       
    86 +{
       
    87 +    switch (fork())
       
    88 +    {
       
    89 +        case 0:  break;
       
    90 +        case -1: return -1;
       
    91 +        default: _exit(0); 
       
    92 +    }
       
    93 +
       
    94 +    if (setsid() < 0)
       
    95 +      return -1;
       
    96 +
       
    97 +    switch (fork())
       
    98 +    {
       
    99 +        case 0:  break;
       
   100 +        case -1: return -1;
       
   101 +        default: _exit(0);
       
   102 +    }
       
   103 +
       
   104 +    if (!nochdir)
       
   105 +      chdir("/");
       
   106 +
       
   107 +    if (!noclose)
       
   108 +    {
       
   109 +        closeall(0);
       
   110 +        open("/dev/null",O_RDWR);
       
   111 +        dup(0); dup(0);
       
   112 +    }
       
   113 +
       
   114 +    return 0;
       
   115 +}
       
   116 +#endif
       
   117  
       
   118  retval_t ScimBridgeAgentPanelClientImpl::launch_panel ()
       
   119  {
       
   120 diff -ur bootstrap bootstrap
       
   121 --- bootstrap	2007-06-02 11:33:46.000000000 +0800
       
   122 +++ bootstrap	2007-12-26 16:51:10.452073563 +0800
       
   123 @@ -20,6 +20,7 @@
       
   124  #! /bin/sh
       
   125  
       
   126  set -x
       
   127 +glib-gettextize --force
       
   128  aclocal
       
   129  autoheader
       
   130  libtoolize -c --automake 
       
   131 diff -ur client-gtk/Makefile.am client-gtk/Makefile.am
       
   132 --- client-gtk/Makefile.am              2007-06-14 22:42:13.000000000 +0800
       
   133 +++ client-gtk/Makefile.am              2008-08-23 07:36:24.445832916 +0800
       
   134 @@ -24,7 +24,7 @@
       
   135  
       
   136  noinst_HEADERS = scim-bridge-client-gtk.h scim-bridge-client-imcontext-gtk.h  scim-bridge-client-key-event-utility-gtk.h
       
   137  
       
   138 -moduledir = @GTK_LIBDIR@/gtk-2.0/immodules
       
   139 +moduledir = @GTK_LIBDIR@/gtk-2.0/@GTK_BINARY_VERSION@/immodules
       
   140  
       
   141  module_LTLIBRARIES = im-scim-bridge.la
       
   142  
       
   143 diff -ur common/scim-bridge-display.c common/scim-bridge-display.c
       
   144 --- common/scim-bridge-display.c	2007-06-02 11:33:46.000000000 +0800
       
   145 +++ common/scim-bridge-display.c	2007-12-26 16:40:38.947033591 +0800
       
   146 @@ -20,6 +20,7 @@
       
   147  #include <malloc.h>
       
   148  #include <stdlib.h>
       
   149  #include <string.h>
       
   150 +#include <strings.h>
       
   151  
       
   152  #include "scim-bridge-display.h"
       
   153  #include "scim-bridge-output.h"
       
   154 diff -ur common/scim-bridge-string.c common/scim-bridge-string.c
       
   155 --- common/scim-bridge-string.c	2007-06-02 11:33:46.000000000 +0800
       
   156 +++ common/scim-bridge-string.c	2007-12-26 16:40:38.952738727 +0800
       
   157 @@ -24,6 +24,7 @@
       
   158  #include <stdlib.h>
       
   159  #include <string.h>
       
   160  #include <wchar.h>
       
   161 +#include <alloca.h>
       
   162  
       
   163  #include "scim-bridge-string.h"
       
   164  #include "scim-bridge-output.h"
       
   165 diff -ur common/scim-bridge-string.h common/scim-bridge-string.h
       
   166 --- common/scim-bridge-string.h	2007-06-02 11:33:46.000000000 +0800
       
   167 +++ common/scim-bridge-string.h	2007-12-26 16:40:38.953783440 +0800
       
   168 @@ -41,7 +41,7 @@
       
   169      /**
       
   170       * The type for wide string.
       
   171       */
       
   172 -    typedef uint32 wchar;
       
   173 +    typedef unsigned int wchar;
       
   174  #else
       
   175      /**
       
   176       * The type for wide string.
       
   177 diff -ur configure.ac configure.ac
       
   178 --- configure.ac	2007-12-05 23:50:13.000000000 +0800
       
   179 +++ configure.ac	2007-12-26 16:59:41.275906916 +0800
       
   180 @@ -42,7 +42,9 @@
       
   181  # Init gettext
       
   182  #ALL_LINGUAS="zh_CN zh_TW ja ko de fr it cs pa fi sv nl"
       
   183  ALL_LINGUAS=""
       
   184 -AM_GNU_GETTEXT
       
   185 +AM_GLIB_GNU_GETTEXT
       
   186 +LTLIBINTL=
       
   187 +AC_SUBST(LTLIBINTL)
       
   188  
       
   189  # libtool option to control which symbols are exported
       
   190  # right now, symbols starting with _ are not exported
       
   191 @@ -150,8 +152,8 @@
       
   192  
       
   193  if test "$enable_debug" = "yes"; then
       
   194    AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in libscim])
       
   195 -  CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wreturn-type"
       
   196 -  CXXFLAGS="$CXXFLAGS -g -Wall -Wshadow -Woverloaded-virtual -Wreturn-type"
       
   197 +  CFLAGS="$CFLAGS -g"
       
   198 +  CXXFLAGS="$CXXFLAGS -g"
       
   199  else
       
   200    enable_debug=no
       
   201  fi