From 8442d5119b358a0eb4951ed064bc796d702726dd Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 7 Jul 2017 10:36:51 +0200 Subject: [PATCH] gtypist: -Werror=implicit-function-declaration --- packages/gtypist/gtypist_c.patch | 30 ---------------------- packages/gtypist/src-cursmenu.c.patch | 11 ++++++++ packages/gtypist/src-gtypist.c.patch | 47 +++++++++++++++++++++++++++++++++++ packages/gtypist/src-utf8.c.patch | 11 ++++++++ 4 files changed, 69 insertions(+), 30 deletions(-) delete mode 100644 packages/gtypist/gtypist_c.patch create mode 100644 packages/gtypist/src-cursmenu.c.patch create mode 100644 packages/gtypist/src-gtypist.c.patch create mode 100644 packages/gtypist/src-utf8.c.patch diff --git a/packages/gtypist/gtypist_c.patch b/packages/gtypist/gtypist_c.patch deleted file mode 100644 index 030353a9..00000000 --- a/packages/gtypist/gtypist_c.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -u -r ../gtypist-2.9.4/src/gtypist.c ./src/gtypist.c ---- ../gtypist-2.9.4/src/gtypist.c 2013-08-18 16:36:14.000000000 +0200 -+++ ./src/gtypist.c 2014-03-01 01:30:43.000000000 +0100 -@@ -41,7 +41,7 @@ - #include - #include - #include --#ifndef MINGW -+#if !defined(MINGW) && !defined(__ANDROID__) - #include - #endif - -@@ -138,7 +138,7 @@ - #define ADDCH_REV(X) wideaddch_rev(X) - - --#ifdef MINGW -+#if defined(MINGW) || defined(__ANDROID__) - #define MIN( a, b ) ( ( a ) < ( b )? ( a ) : ( b ) ) - #define MAX( a, b ) ( ( a ) > ( b )? ( a ) : ( b ) ) - #endif -@@ -1999,7 +1999,7 @@ - textdomain (PACKAGE); - #endif - --#ifdef MINGW -+#if defined(MINGW) || defined(__ANDROID__) - locale_encoding = "UTF-8"; - #else - locale_encoding = nl_langinfo(CODESET); diff --git a/packages/gtypist/src-cursmenu.c.patch b/packages/gtypist/src-cursmenu.c.patch new file mode 100644 index 00000000..991395d1 --- /dev/null +++ b/packages/gtypist/src-cursmenu.c.patch @@ -0,0 +1,11 @@ +diff -u -r ../gtypist-2.9.5/src/cursmenu.c ./src/cursmenu.c +--- ../gtypist-2.9.5/src/cursmenu.c 2013-08-18 14:36:14.000000000 +0000 ++++ ./src/cursmenu.c 2017-07-07 08:35:39.553927999 +0000 +@@ -20,6 +20,7 @@ + #include "config.h" + #include "cursmenu.h" + #include "script.h" ++#include "utf8.h" + + #ifdef HAVE_PDCURSES + #include diff --git a/packages/gtypist/src-gtypist.c.patch b/packages/gtypist/src-gtypist.c.patch new file mode 100644 index 00000000..95b1d4de --- /dev/null +++ b/packages/gtypist/src-gtypist.c.patch @@ -0,0 +1,47 @@ +diff -u -r ../gtypist-2.9.5/src/gtypist.c ./src/gtypist.c +--- ../gtypist-2.9.5/src/gtypist.c 2014-08-12 06:29:13.000000000 +0000 ++++ ./src/gtypist.c 2017-07-07 08:34:41.950574988 +0000 +@@ -21,6 +21,7 @@ + */ + + #include "config.h" ++#include "utf8.h" + #include + #include + #include +@@ -42,7 +43,7 @@ + #include + #include + #include +-#ifndef MINGW ++#if !defined(MINGW) && !defined(__ANDROID__) + #include + #endif + +@@ -62,6 +63,8 @@ + char* locale_encoding; /* current locale's encoding */ + int isUTF8Locale; /* does the current locale have a UTF-8 encoding? */ + ++void check_script_file_with_current_encoding( FILE *script ); ++ + /* character to be display to represent "enter key" */ + /* TODO: this requires beginner mode! + #define RETURN_CHARACTER 0x000023CE */ +@@ -139,7 +142,7 @@ + #define ADDCH_REV(X) wideaddch_rev(X) + + +-#ifdef MINGW ++#if defined(MINGW) || defined(__ANDROID__) + #define MIN( a, b ) ( ( a ) < ( b )? ( a ) : ( b ) ) + #define MAX( a, b ) ( ( a ) > ( b )? ( a ) : ( b ) ) + #endif +@@ -2010,7 +2013,7 @@ + textdomain (PACKAGE); + #endif + +-#ifdef MINGW ++#if defined(MINGW) || defined(__ANDROID__) + locale_encoding = "UTF-8"; + #else + locale_encoding = nl_langinfo(CODESET); diff --git a/packages/gtypist/src-utf8.c.patch b/packages/gtypist/src-utf8.c.patch new file mode 100644 index 00000000..6be32160 --- /dev/null +++ b/packages/gtypist/src-utf8.c.patch @@ -0,0 +1,11 @@ +diff -u -r ../gtypist-2.9.5/src/utf8.c ./src/utf8.c +--- ../gtypist-2.9.5/src/utf8.c 2013-08-18 14:36:14.000000000 +0000 ++++ ./src/utf8.c 2017-07-07 08:32:20.764160765 +0000 +@@ -19,6 +19,7 @@ + + #include "config.h" + #include "utf8.h" ++#include "error.h" + + #ifdef HAVE_PDCURSES + #include -- 2.11.0