Ticket #70210: 0001-Fix-implicit-int-ISO-C99-erro.patch

File 0001-Fix-implicit-int-ISO-C99-erro.patch, 1.8 KB (added by kippesp (Paul Kippes), 5 months ago)

Complete port patch

  • textproc/uni2ascii/Portfile

    From a1613f3982d4262129c2caa72885583026b5242c Mon Sep 17 00:00:00 2001
    From: Paul Kippes <paul.m.kippes@intel.com>
    Date: Wed, 12 Jun 2024 10:23:19 -0700
    Subject: [PATCH] Fix implicit int ISO C99 erro
    
    uni2ascii.c failes to compile with Apple clang v15.0.0 (clang-1500.3.9.4).
    Fails with error:
    
        type specifier missing, defaults to int; ISO C99 and later do not
        support implicit int [-Wimplicit-int]
    ---
     textproc/uni2ascii/Portfile                |  3 ++-
     textproc/uni2ascii/files/patch-uni2ascii.c | 20 ++++++++++++++++++++
     2 files changed, 22 insertions(+), 1 deletion(-)
     create mode 100644 textproc/uni2ascii/files/patch-uni2ascii.c
    
    diff --git a/textproc/uni2ascii/Portfile b/textproc/uni2ascii/Portfile
    index 68bea58019c..a7a81d6e5ff 100644
    a b use_bzip2 yes 
    3030depends_lib         port:gettext
    3131
    3232patchfiles          patch-configure.ac.diff \
    33                     implicit.patch
     33                    implicit.patch \
     34                    patch-uni2ascii.c
    3435
    3536use_autoreconf      yes
    3637
  • new file textproc/uni2ascii/files/patch-uni2ascii.c

    diff --git a/textproc/uni2ascii/files/patch-uni2ascii.c b/textproc/uni2ascii/files/patch-uni2ascii.c
    new file mode 100644
    index 00000000000..e2164bf15b2
    - +  
     1--- uni2ascii.c.orig    2024-06-12 10:17:17.916263000 -0700
     2+++ uni2ascii.c 2024-06-12 10:17:30.175434579 -0700
     3@@ -2679,7 +2679,7 @@
     4  * search may be advisable. For the time being we just do a linear search.
     5  */
     6 
     7-SubstituteChar(UTF32 c) {
     8+int SubstituteChar(UTF32 c) {
     9   int i;
     10   for(i = 0; i < SubCnt; i++) {
     11     if(c == SubList[i].u) {
     12@@ -2693,7 +2693,7 @@
     13   return 0;
     14 }
     15 
     16-AddCustomSubstitution(char *str){
     17+void AddCustomSubstitution(char *str){
     18   char *Left;
     19   char *Right;
     20   char *Delim;