Rename SendResponse to SendDirectStackResponse in ocstack.c
[platform/upstream/iotivity.git] / resource / csdk / connectivity / lib / android / patches / glib-2.40.2-withoutMakefile.patch
1 diff -rupN glibref/glib-2.40.2/config.h glibpatch/glib-2.40.2/config.h
2 --- glibref/glib-2.40.2/config.h        2015-03-31 16:25:56.882894898 +0900
3 +++ glibpatch/glib-2.40.2/config.h      2015-04-01 13:21:19.593558693 +0900
4 @@ -31,8 +31,9 @@
5  /* #undef ENABLE_GC_FRIENDLY_DEFAULT */
6  
7  /* always defined to indicate that i18n is enabled */
8 +#ifndef _GLIB_ANDROID_
9  #define ENABLE_NLS 1
10 -
11 +#endif /* _GLIB_ANDROID__ */
12  /* Define the gettext package to be used */
13  #define GETTEXT_PACKAGE "glib20"
14  
15 @@ -100,8 +101,9 @@
16  /* #undef HAVE_COCOA */
17  
18  /* Have nl_langinfo (CODESET) */
19 +#ifndef _GLIB_ANDROID_
20  #define HAVE_CODESET 1
21 -
22 +#endif /* _GLIB_ANDROID_ */
23  /* Define to 1 if you have the <crt_externs.h> header file. */
24  /* #undef HAVE_CRT_EXTERNS_H */
25  
26 @@ -130,8 +132,10 @@
27  /* we have the eventfd(2) system call */
28  #define HAVE_EVENTFD 1
29  
30 +#ifndef _GLIB_ANDROID_
31  /* Define to 1 if you have the `fallocate' function. */
32  #define HAVE_FALLOCATE 1
33 +#endif /* _GLIB_ANDROID_ */
34  
35  /* Define if we have FAM */
36  /* #undef HAVE_FAM */
37 @@ -224,6 +228,7 @@
38  /* Define to 1 if you have the `kqueue' function. */
39  /* #undef HAVE_KQUEUE */
40  
41 +#ifndef _GLIB_ANDROID_
42  /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
43  #define HAVE_LANGINFO_CODESET 1
44  
45 @@ -232,6 +237,7 @@
46  
47  /* Have nl_langinfo (PM_STR) */
48  #define HAVE_LANGINFO_TIME 1
49 +#endif /* _GLIB_ANDROID_ */
50  
51  /* Define to 1 if you have the `lchmod' function. */
52  /* #undef HAVE_LCHMOD */
53 @@ -283,9 +289,10 @@
54  
55  /* Define to 1 if you have the <memory.h> header file. */
56  #define HAVE_MEMORY_H 1
57 -
58 +#ifndef _GLIB_ANDROID_
59  /* Define to 1 if you have the `mmap' function. */
60  #define HAVE_MMAP 1
61 +#endif /* _GLIB_ANDROID_ */
62  
63  /* Define to 1 if you have the <mntent.h> header file. */
64  #define HAVE_MNTENT_H 1
65 @@ -317,8 +324,10 @@
66  /* Have POSIX function getgrgid_r */
67  #define HAVE_POSIX_GETGRGID_R 1
68  
69 +#ifndef _GLIB_ANDROID_
70  /* Have POSIX function getpwuid_r */
71  #define HAVE_POSIX_GETPWUID_R 1
72 +#endif /* _GLIB_ANDROID_ */
73  
74  /* Define to 1 if you have the `posix_memalign' function. */
75  #define HAVE_POSIX_MEMALIGN 1
76 @@ -333,8 +342,11 @@
77  #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
78  
79  /* Have function pthread_cond_timedwait_relative_np */
80 +#ifndef _GLIB_ANDROID_
81  /* #undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP */
82 -
83 +#else
84 +#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 0
85 +#endif /* _GLIB_ANDROID_ */
86  /* Define to 1 if the system has the type `ptrdiff_t'. */
87  #define HAVE_PTRDIFF_T 1
88  
89 @@ -384,8 +396,10 @@
90  /* Define to 1 if you have the <stdlib.h> header file. */
91  #define HAVE_STDLIB_H 1
92  
93 +#ifndef _GLIB_ANDROID_
94  /* Define to 1 if you have the `stpcpy' function. */
95  #define HAVE_STPCPY 1
96 +#endif /* _GLIB_ANDROID_ */
97  
98  /* Define to 1 if you have the `strcasecmp' function. */
99  #define HAVE_STRCASECMP 1
100 @@ -532,10 +546,10 @@
101  
102  /* Define to 1 if you have the <sys/xattr.h> header file. */
103  #define HAVE_SYS_XATTR_H 1
104 -
105 +#ifndef _GLIB_ANDROID_
106  /* Define to 1 if you have the `timegm' function. */
107  #define HAVE_TIMEGM 1
108 -
109 +#endif /* _GLIB_ANDROID_ */
110  /* Define to 1 if you have the <unistd.h> header file. */
111  #define HAVE_UNISTD_H 1
112  
113 @@ -563,7 +577,7 @@
114  
115  /* Define to 1 if you have the `vsnprintf' function. */
116  #define HAVE_VSNPRINTF 1
117 -
118 +#ifndef _GLIB_ANDROID_
119  /* Define if you have the 'wchar_t' type. */
120  #define HAVE_WCHAR_T 1
121  
122 @@ -575,12 +589,14 @@
123  
124  /* Define to 1 if xattr is available */
125  #define HAVE_XATTR 1
126 -
127 +#endif
128  /* Define to 1 if xattr API uses XATTR_NOFOLLOW */
129  /* #undef HAVE_XATTR_NOFOLLOW */
130  
131  /* Define to 1 if you have the <xlocale.h> header file. */
132 +#ifndef _GLIB_ANDROID_
133  #define HAVE_XLOCALE_H 1
134 +#endif /* _GLIB_ANDROID_ */
135  
136  /* Define to 1 if you have the `_NSGetEnviron' function. */
137  /* #undef HAVE__NSGETENVIRON */
138 diff -rupN glibref/glib-2.40.2/glib/gconvert.c glibpatch/glib-2.40.2/glib/gconvert.c
139 --- glibref/glib-2.40.2/glib/gconvert.c 2015-03-31 16:25:56.946894901 +0900
140 +++ glibpatch/glib-2.40.2/glib/gconvert.c       2015-03-31 16:40:50.546926503 +0900
141 @@ -22,7 +22,11 @@
142  #include "glibconfig.h"
143  
144  #ifndef G_OS_WIN32
145 +
146 +#ifndef _GLIB_ANDROID_
147  #include <iconv.h>
148 +#endif /* _GLIB_ANDROID_ */
149 +
150  #endif
151  #include <errno.h>
152  #include <stdio.h>
153 @@ -168,6 +172,7 @@
154  
155  G_DEFINE_QUARK (g_convert_error, g_convert_error)
156  
157 +#ifndef _GLIB_ANDROID_
158  static gboolean
159  try_conversion (const char *to_codeset,
160                 const char *from_codeset,
161 @@ -197,9 +202,9 @@ try_to_aliases (const char **to_aliases,
162           p++;
163         }
164      }
165 -
166    return FALSE;
167  }
168 +#endif /* _GLIB_ANDROID_ */
169  
170  /**
171   * g_iconv_open:
172 @@ -220,6 +225,7 @@ GIConv
173  g_iconv_open (const gchar  *to_codeset,
174               const gchar  *from_codeset)
175  {
176 +#ifndef _GLIB_ANDROID_
177    iconv_t cd;
178    
179    if (!try_conversion (to_codeset, from_codeset, &cd))
180 @@ -248,6 +254,9 @@ g_iconv_open (const gchar  *to_codeset,
181  
182   out:
183    return (cd == (iconv_t)-1) ? (GIConv)-1 : (GIConv)cd;
184 +#else
185 +  return (GIConv)-1;
186 +#endif /* _GLIB_ANDROID_ */
187  }
188  
189  /**
190 @@ -274,9 +283,13 @@ g_iconv (GIConv   converter,
191          gchar  **outbuf,
192          gsize   *outbytes_left)
193  {
194 +#ifndef _GLIB_ANDROID_
195    iconv_t cd = (iconv_t)converter;
196  
197    return iconv (cd, inbuf, inbytes_left, outbuf, outbytes_left);
198 +#else
199 +  return -1;
200 +#endif /* _GLIB_ANDROID_ */
201  }
202  
203  /**
204 @@ -297,9 +310,13 @@ g_iconv (GIConv   converter,
205  gint
206  g_iconv_close (GIConv converter)
207  {
208 +#ifndef _GLIB_ANDROID_
209    iconv_t cd = (iconv_t)converter;
210  
211    return iconv_close (cd);
212 +#else
213 +  return -1;
214 +#endif /* _GLIB_ANDROID_ */
215  }
216  
217  static GIConv
218 diff -rupN glibref/glib-2.40.2/glib/gfileutils.c glibpatch/glib-2.40.2/glib/gfileutils.c
219 --- glibref/glib-2.40.2/glib/gfileutils.c       2015-03-31 16:25:57.170894910 +0900
220 +++ glibpatch/glib-2.40.2/glib/gfileutils.c     2015-03-31 16:37:29.594919396 +0900
221 @@ -54,7 +54,9 @@
222  
223  #ifdef HAVE_LINUX_MAGIC_H /* for btrfs check */
224  #include <linux/magic.h>
225 +#ifndef _GLIB_ANDROID_
226  #include <sys/vfs.h>
227 +#endif /* _GLIB_ANDROID_ */
228  #endif
229  
230  
231 diff -rupN glibref/glib-2.40.2/glib/ggettext.c glibpatch/glib-2.40.2/glib/ggettext.c
232 --- glibref/glib-2.40.2/glib/ggettext.c 2015-03-31 16:25:57.182894907 +0900
233 +++ glibpatch/glib-2.40.2/glib/ggettext.c       2015-03-31 16:37:55.538920314 +0900
234 @@ -40,7 +40,10 @@
235  
236  #include <string.h>
237  #include <locale.h>
238 +
239 +#ifndef _GLIB_ANDROID_
240  #include <libintl.h>
241 +#endif /* _GLIB_ANDROID_ */
242  
243  #ifdef G_OS_WIN32
244  
245 diff -rupN glibref/glib-2.40.2/glib/glibconfig.h glibpatch/glib-2.40.2/glib/glibconfig.h
246 --- glibref/glib-2.40.2/glib/glibconfig.h       2015-03-31 16:25:57.166894909 +0900
247 +++ glibpatch/glib-2.40.2/glib/glibconfig.h     2015-03-31 16:38:06.954920717 +0900
248 @@ -154,7 +154,9 @@ typedef unsigned int guintptr;
249  #define G_THREADS_ENABLED
250  #define G_THREADS_IMPL_POSIX
251  
252 +#ifndef _GLIB_ANDROID_
253  #define G_ATOMIC_LOCK_FREE
254 +#endif /* _GLIB_ANDROID_ */
255  
256  #define GINT16_TO_LE(val)      ((gint16) (val))
257  #define GUINT16_TO_LE(val)     ((guint16) (val))
258 diff -rupN glibref/glib-2.40.2/glib/gslice.c glibpatch/glib-2.40.2/glib/gslice.c
259 --- glibref/glib-2.40.2/glib/gslice.c   2015-03-31 16:25:56.946894901 +0900
260 +++ glibpatch/glib-2.40.2/glib/gslice.c 2015-03-31 16:38:38.302921827 +0900
261 @@ -388,7 +388,9 @@ slice_config_init (SliceConfig *config)
262         * This way it's possible to force gslice to be enabled under
263         * valgrind just by setting G_SLICE to the empty string.
264         */
265 + #ifndef _GLIB_ANDROID_
266        if (RUNNING_ON_VALGRIND)
267 +#endif /* _GLIB_ANDROID_ */
268          config->always_malloc = TRUE;
269      }
270  }
271 diff -rupN glibref/glib-2.40.2/glib/gstrfuncs.c glibpatch/glib-2.40.2/glib/gstrfuncs.c
272 --- glibref/glib-2.40.2/glib/gstrfuncs.c        2015-03-31 16:25:56.950894901 +0900
273 +++ glibpatch/glib-2.40.2/glib/gstrfuncs.c      2015-03-31 16:39:00.154922598 +0900
274 @@ -309,6 +309,7 @@ static const guint16 ascii_table_data[25
275  
276  const guint16 * const g_ascii_table = ascii_table_data;
277  
278 +#ifndef _GLIB_ANDROID_
279  #if defined (HAVE_NEWLOCALE) && \
280      defined (HAVE_USELOCALE) && \
281      defined (HAVE_STRTOD_L) && \
282 @@ -316,6 +317,7 @@ const guint16 * const g_ascii_table = as
283      defined (HAVE_STRTOLL_L)
284  #define USE_XLOCALE 1
285  #endif
286 +#endif /* _GLIB_ANDROID_ */
287  
288  #ifdef USE_XLOCALE
289  static locale_t