Search
lxdream.org :: lxdream/android/deps/gettext-0.18.1.1.diff
lxdream 0.9.1
released Jun 29
Download Now
filename android/deps/gettext-0.18.1.1.diff
changeset 1239:be3121267597
author nkeynes
date Sat Feb 25 21:30:49 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Android support WIP
file annotate diff log raw
nkeynes@1239
     1
diff -ur gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h
nkeynes@1239
     2
--- gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h	2010-04-25 19:20:42.000000000 +1000
nkeynes@1239
     3
+++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdint.in.h	2012-02-16 09:06:32.000000000 +1000
nkeynes@1239
     4
@@ -33,6 +33,13 @@
nkeynes@1239
     5
    <inttypes.h>.  */
nkeynes@1239
     6
 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
nkeynes@1239
     7
 
nkeynes@1239
     8
+/* On Android (Bionic libc), <sys/types.h> includes this file before
nkeynes@1239
     9
+   having defined 'time_t'.  Therefore in this case avoid including
nkeynes@1239
    10
+   other system header files; just include the system's <stdint.h>.  */
nkeynes@1239
    11
+#if defined __ANDROID__
nkeynes@1239
    12
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
nkeynes@1239
    13
+#else
nkeynes@1239
    14
+
nkeynes@1239
    15
 /* Get those types that are already defined in other system include
nkeynes@1239
    16
    files, so that we can "#define int8_t signed char" below without
nkeynes@1239
    17
    worrying about a later system include file containing a "typedef
nkeynes@1239
    18
@@ -566,3 +573,4 @@
nkeynes@1239
    19
 
nkeynes@1239
    20
 #endif /* _GL_STDINT_H */
nkeynes@1239
    21
 #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
nkeynes@1239
    22
+#endif /* !(defined __ANDROID__) */
nkeynes@1239
    23
diff -ur gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h
nkeynes@1239
    24
--- gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h	2010-05-24 19:42:46.000000000 +1000
nkeynes@1239
    25
+++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdint.in.h	2012-02-16 09:06:53.000000000 +1000
nkeynes@1239
    26
@@ -33,6 +33,13 @@
nkeynes@1239
    27
    <inttypes.h>.  */
nkeynes@1239
    28
 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
nkeynes@1239
    29
 
nkeynes@1239
    30
+/* On Android (Bionic libc), <sys/types.h> includes this file before
nkeynes@1239
    31
+   having defined 'time_t'.  Therefore in this case avoid including
nkeynes@1239
    32
+   other system header files; just include the system's <stdint.h>.  */
nkeynes@1239
    33
+#if defined __ANDROID__
nkeynes@1239
    34
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
nkeynes@1239
    35
+#else
nkeynes@1239
    36
+
nkeynes@1239
    37
 /* Get those types that are already defined in other system include
nkeynes@1239
    38
    files, so that we can "#define int8_t signed char" below without
nkeynes@1239
    39
    worrying about a later system include file containing a "typedef
nkeynes@1239
    40
@@ -566,3 +573,4 @@
nkeynes@1239
    41
 
nkeynes@1239
    42
 #endif /* _GL_STDINT_H */
nkeynes@1239
    43
 #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
nkeynes@1239
    44
+#endif /* !(defined __ANDROID__) */
nkeynes@1239
    45
diff -ur gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h
nkeynes@1239
    46
--- gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h	2010-04-25 19:22:40.000000000 +1000
nkeynes@1239
    47
+++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdint.in.h	2012-02-16 09:07:10.000000000 +1000
nkeynes@1239
    48
@@ -33,6 +33,13 @@
nkeynes@1239
    49
    <inttypes.h>.  */
nkeynes@1239
    50
 #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
nkeynes@1239
    51
 
nkeynes@1239
    52
+/* On Android (Bionic libc), <sys/types.h> includes this file before
nkeynes@1239
    53
+   having defined 'time_t'.  Therefore in this case avoid including
nkeynes@1239
    54
+   other system header files; just include the system's <stdint.h>.  */
nkeynes@1239
    55
+#if defined __ANDROID__
nkeynes@1239
    56
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
nkeynes@1239
    57
+#else
nkeynes@1239
    58
+
nkeynes@1239
    59
 /* Get those types that are already defined in other system include
nkeynes@1239
    60
    files, so that we can "#define int8_t signed char" below without
nkeynes@1239
    61
    worrying about a later system include file containing a "typedef
nkeynes@1239
    62
@@ -566,3 +573,4 @@
nkeynes@1239
    63
 
nkeynes@1239
    64
 #endif /* _GL_STDINT_H */
nkeynes@1239
    65
 #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
nkeynes@1239
    66
+#endif /* !(defined __ANDROID__) */
nkeynes@1239
    67
diff -ur gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c
nkeynes@1239
    68
--- gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c	2010-05-25 00:49:26.000000000 +1000
nkeynes@1239
    69
+++ gettext-0.18.1.1/gettext-tools/libgrep/nl_langinfo.c	2012-02-16 17:42:53.000000000 +1000
nkeynes@1239
    70
@@ -142,9 +142,17 @@
nkeynes@1239
    71
 # endif
nkeynes@1239
    72
     /* nl_langinfo items of the LC_NUMERIC category */
nkeynes@1239
    73
     case RADIXCHAR:
nkeynes@1239
    74
+#ifdef __ANDROID__
nkeynes@1239
    75
+      return ".";
nkeynes@1239
    76
+#else
nkeynes@1239
    77
       return localeconv () ->decimal_point;
nkeynes@1239
    78
+#endif
nkeynes@1239
    79
     case THOUSEP:
nkeynes@1239
    80
+#ifdef __ANDROID__
nkeynes@1239
    81
+      return ",";
nkeynes@1239
    82
+#else
nkeynes@1239
    83
       return localeconv () ->thousands_sep;
nkeynes@1239
    84
+#endif
nkeynes@1239
    85
     /* nl_langinfo items of the LC_TIME category.
nkeynes@1239
    86
        TODO: Really use the locale.  */
nkeynes@1239
    87
     case D_T_FMT:
nkeynes@1239
    88
diff -ur gettext-0.18.1.1/gettext-tools/src/msginit.c gettext-0.18.1.1/gettext-tools/src/msginit.c
nkeynes@1239
    89
--- gettext-0.18.1.1/gettext-tools/src/msginit.c	2010-06-06 22:49:58.000000000 +1000
nkeynes@1239
    90
+++ gettext-0.18.1.1/gettext-tools/src/msginit.c	2012-02-16 17:44:33.000000000 +1000
nkeynes@1239
    91
@@ -1081,7 +1081,11 @@
nkeynes@1239
    92
       char *result;
nkeynes@1239
    93
 
nkeynes@1239
    94
       /* Return the pw_gecos field, upto the first comma (if any).  */
nkeynes@1239
    95
+#ifdef __ANDROID__
nkeynes@1239
    96
+      fullname = pwd->pw_name;
nkeynes@1239
    97
+#else
nkeynes@1239
    98
       fullname = pwd->pw_gecos;
nkeynes@1239
    99
+#endif
nkeynes@1239
   100
       fullname_end = strchr (fullname, ',');
nkeynes@1239
   101
       if (fullname_end == NULL)
nkeynes@1239
   102
         fullname_end = fullname + strlen (fullname);
.