File gpc_fix_warning_errors.patch of Package gpc

--- gcc-3.4.6/intl/configure.orig	2025-03-30 19:15:24.441309155 +0100
+++ gcc-3.4.6/intl/configure	2025-03-30 19:17:52.506496648 +0100
@@ -1148,7 +1148,7 @@
 #line 1149 "configure"
 #include "confdefs.h"
 
-main(){return(0);}
+int main(){return(0);}
 EOF
 if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
@@ -1833,7 +1833,7 @@
   else
     return (&dummy > addr) ? 1 : -1;
 }
-main ()
+int main ()
 {
   exit (find_stack_direction() < 0);
 }
--- gcc-3.4.6/libiberty/regex.c.orig	2025-03-30 20:22:28.402379587 +0100
+++ gcc-3.4.6/libiberty/regex.c	2025-03-30 20:22:56.603370380 +0100
@@ -126,7 +126,7 @@
    even if config.h says that we can.  */
 #  undef REL_ALLOC
 
-#  if defined STDC_HEADERS || defined _LIBC
+#  if defined STDC_HEADERS || defined HAVE_STDLIB_H || defined _LIBC
 #   include <stdlib.h>
 #  else
 char *malloc ();
--- gcc-3.4.6/libiberty/md5.c.orig	2025-04-02 17:01:03.971790241 +0100
+++ gcc-3.4.6/libiberty/md5.c	2025-04-02 17:02:27.458571174 +0100
@@ -27,7 +27,7 @@
 
 #include <sys/types.h>
 
-#if STDC_HEADERS || defined _LIBC
+#if STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
 # include <stdlib.h>
 # include <string.h>
 #else
--- gcc-3.4.6/gcc/cpplib.c.orig	2025-04-02 17:49:18.248171563 +0100
+++ gcc-3.4.6/gcc/cpplib.c	2025-04-02 17:51:46.209107959 +0100
@@ -191,7 +191,7 @@
    did use this notation in its preprocessed output.  */
 static const directive linemarker_dir =
 {
-  do_linemarker, U"#", 1, KANDR, IN_I
+   do_linemarker, (uchar*)"#", 1, KANDR, IN_I
 };
 
 #define SEEN_EOL() (pfile->cur_token[-1].type == CPP_EOF)
@@ -656,7 +656,7 @@
       const unsigned char *dir;
 
       if (pfile->directive == &dtable[T_PRAGMA])
-	dir = U"pragma dependency";
+         dir = (uchar*)"pragma dependency";
       else
 	dir = pfile->directive->name;
       cpp_error (pfile, CPP_DL_ERROR, "#%s expects \"FILENAME\" or <FILENAME>",
--- gcc-3.4.6/gcc/cpplex.c.orig	2025-04-02 18:04:07.885863260 +0100
+++ gcc-3.4.6/gcc/cpplex.c	2025-04-02 18:04:58.543557507 +0100
@@ -39,7 +39,7 @@
 };
 
 static const unsigned char *const digraph_spellings[] =
-{ U"%:", U"%:%:", U"<:", U":>", U"<%", U"%>" };
+{ (uchar*)"%:", (uchar*)"%:%:", (uchar*)"<:", (uchar*)":>", (uchar*)"<%", (uchar*)"%>" };
 
 #define OP(e, s) { SPELL_OPERATOR, U s           },
 #define TK(e, s) { s,              U #e },
--- gcc-3.4.6/gcc/cppmacro.c.orig	2025-04-02 18:13:41.193037506 +0100
+++ gcc-3.4.6/gcc/cppmacro.c	2025-04-02 18:14:08.037935338 +0100
@@ -220,8 +220,8 @@
 	      cpp_errno (pfile, CPP_DL_WARNING,
 			 "could not determine date and time");
 		
-	      pfile->date = U"\"??? ?? ????\"";
-	      pfile->time = U"\"??:??:??\"";
+         pfile->date = (uchar*)"\"??? ?? ????\"";
+         pfile->time = (uchar*)"\"??:??:??\"";
 	    }
 	}
 
--- gcc-3.4.6/libiberty/getpwd.c.orig	2025-04-04 12:08:58.800081280 +0100
+++ gcc-3.4.6/libiberty/getpwd.c	2025-04-04 12:11:38.941370846 +0100
@@ -38,7 +38,7 @@
 
 /* Prototype these in case the system headers don't provide them. */
 extern char *getpwd ();
-extern char *getwd ();
+extern char *getwd (char *);
 
 #include "libiberty.h"
 
--- gcc-3.4.6/libiberty/pex-unix.c.orig	2025-04-04 12:23:31.136895126 +0100
+++ gcc-3.4.6/libiberty/pex-unix.c	2025-04-04 12:27:33.948912722 +0100
@@ -44,8 +44,8 @@
 #define waitpid(pid, status, flags) wait(status)
 #endif
 
-extern int execv ();
-extern int execvp ();
+extern int execv (const char *__path, char *const __argv[]);
+extern int execvp (const char *__file, char *const __argv[]);
 
 int
 pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
@@ -56,7 +56,7 @@
      char **errmsg_fmt, **errmsg_arg;
      int flags;
 {
-  int (*func)() = (flags & PEXECUTE_SEARCH ? execvp : execv);
+  int (*func)(const char *, char *const []) = (flags & PEXECUTE_SEARCH ? execvp : execv);
   int pid;
   int pdes[2];
   int input_desc, output_desc;
openSUSE Build Service is sponsored by