X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/7fc9693f2d24e3f763903601adc26e17b970a49b..125a21e62849d9e5bd28d0a8f3bb96ac9668295f:/packages/postgresql/src-bin-initdb-initdb.c.patch diff --git a/packages/postgresql/src-bin-initdb-initdb.c.patch b/packages/postgresql/src-bin-initdb-initdb.c.patch index b4a4eae1..a1f5670e 100644 --- a/packages/postgresql/src-bin-initdb-initdb.c.patch +++ b/packages/postgresql/src-bin-initdb-initdb.c.patch @@ -1,7 +1,7 @@ -diff -u -r ../postgresql-9.6.2/src/bin/initdb/initdb.c ./src/bin/initdb/initdb.c ---- ../postgresql-9.6.2/src/bin/initdb/initdb.c 2017-02-06 22:45:25.000000000 +0100 -+++ ./src/bin/initdb/initdb.c 2017-03-05 14:41:04.690265407 +0100 -@@ -122,8 +122,8 @@ +diff -u -r ../postgresql-10.0/src/bin/initdb/initdb.c ./src/bin/initdb/initdb.c +--- ../postgresql-10.0/src/bin/initdb/initdb.c 2017-10-02 23:09:15.000000000 +0200 ++++ ./src/bin/initdb/initdb.c 2017-10-06 21:45:24.088346650 +0200 +@@ -119,8 +119,8 @@ /* values to be obtained from arguments */ static char *pg_data = ""; @@ -12,50 +12,3 @@ diff -u -r ../postgresql-9.6.2/src/bin/initdb/initdb.c ./src/bin/initdb/initdb.c static char *lc_collate = ""; static char *lc_ctype = ""; static char *lc_monetary = ""; -@@ -1848,6 +1848,7 @@ - setup_collation(FILE *cmdfd) - { - #if defined(HAVE_LOCALE_T) && !defined(WIN32) -+#ifndef __ANDROID__ - int i; - FILE *locale_a_handle; - char localebuf[NAMEDATALEN]; /* we assume ASCII so this is fine */ -@@ -1856,12 +1857,14 @@ - locale_a_handle = popen_check("locale -a", "r"); - if (!locale_a_handle) - return; /* complaint already printed */ -+#endif - - PG_CMD_PUTS("CREATE TEMP TABLE tmp_pg_collation ( " - " collname name, " - " locale name, " - " encoding int) WITHOUT OIDS;\n\n"); - -+#ifndef __ANDROID__ - while (fgets(localebuf, sizeof(localebuf), locale_a_handle)) - { - size_t len; -@@ -1938,6 +1941,7 @@ - } - free(quoted_locale); - } -+#endif - - /* Add an SQL-standard name */ - PG_CMD_PRINTF1("INSERT INTO tmp_pg_collation VALUES ('ucs_basic', 'C', %d);\n\n", PG_UTF8); -@@ -1969,6 +1973,7 @@ - */ - PG_CMD_PUTS("DROP TABLE tmp_pg_collation;\n\n"); - -+#ifndef __ANDROID__ - pclose(locale_a_handle); - - if (count == 0 && !debug) -@@ -1976,6 +1981,7 @@ - printf(_("No usable system locales were found.\n")); - printf(_("Use the option \"--debug\" to see details.\n")); - } -+#endif - #endif /* not HAVE_LOCALE_T && not WIN32 */ - } -